这句符合你的本意?作者: w490978025 时间: 2007-06-07 21:56
哦。写错了
是if(!isatty(0))
fatal("error");作者: rain_fish 时间: 2010-08-09 15:40
NAME
isatty - does this descriptor refer to a terminal
SYNOPSIS
#include <unistd.h>
int isatty(int desc);
DESCRIPTION
returns 1 if desc is an open descriptor connected to a terminal and 0 else.
CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001作者: daybreakcx 时间: 2010-08-09 15:49
man一下是最靠谱的