Fifo buffer question
Michael ODonnell
michael.odonnell at comcast.net
Thu Feb 6 15:22:03 EST 2014
> Could I start the process with " > fifo-buffer.txt" and then
> when I want to check the output, run a "tail -f fifo-buffer.txt"
If your fifo-buffer.txt is a plain file that isn't managed
(log rotation, etc) then the risk is that it wastes or
exhausts disk space. If it's a named pipe any writes to it
will block until somebody opens it for reading and if they
subsequently close it the writer will see an error (SIGPIPE?)
that it'd better be prepared to handle.
Rigging your process to route its output into a managed
logfile is fairly easy using the logger tool and configuring
log rotation isn't too hard, either.
The venerable SIGUSR1 trick that ChrisL suggested works well
in some situations and is employed by dd, among others.
More information about the gnhlug-discuss
mailing list