A: Linux pipe is buffered (4096? 65536? bytes)
Solution#1:
Unix buffering delays output to stdout, ruins your day | TurnKey GNU/Linux (turnkeylinux.org)
Solution#2:fflush(stdout);
setvbuf(stdout, NULL, _IONBF, 0);
Solution#3:
$ stdbuf -o0 application_writes_stdout | application_reads_stdin
Solution#4:
沒有留言:
張貼留言