I have a server program just writes output log to STDOUT.
I also have another Perl shell script named “logfile” ,it will gets data from STDIN and shows some output.
linux$ server | logfile
at first log-file has output ,but after a few moments it stops..
is there anyone has came across this problem?
serverprobably buffers its output, feeding it to the pipe in chunks. Isservera Perl script? Addor
to it to disable buffering for STDOUT. (Well, the first one will disable buffering for whatever handle you have
selected, but that’s STDOUT by default.)