/* http://www.pixelbeat.org/programming/stdio_buffering/ http://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00164.html */ #include __attribute__((constructor))void f(){setvbuf(stdout,NULL,_IONBF,0);} // pretend stdin, stdout, and stderr are a tty // int isatty( int fd) { if( 0 <= fd && fd <= 2) return 1; else return 0; }