From 9200ad37c96b562aff025a46d8f43b56b3abf562 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 30 Jul 1999 21:02:54 +0000 Subject: [PATCH] document tail's new option: --pid=PID --- doc/textutils.texi | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/textutils.texi b/doc/textutils.texi index 95c7b238a8..d242683835 100644 --- a/doc/textutils.texi +++ b/doc/textutils.texi @@ -1525,6 +1525,27 @@ Change the number of seconds to wait between iterations (the default is 1). During one iteration, every specified file is checked to see if it has changed size. +@itemx --pid=@var{pid} +@opindex --pid +When following by name or by descriptor, you may specify the process ID +@var{pid} of the sole writer of all @var{file} arguments. Then, when that +process terminates, tail will also terminate. For this to work properly, +the tail process and the writer must be on the same machine and the tail +process must be able to send a signal to the writing process (but does +not actually send any signal). For example, to save the output of a +build in a file and to watch the file grow, if you invoke @code{make} +and @code{tail} like this then the tail process will stop when your +build completes. Without this option, you would have had to kill the +@code{tail -f} process yourself. +@example +make >& makerr & tail --pid=$! -f makerr +@end example +If you specify a valid @var{pid} that is not in use or that does not +correspond to the process that is writing to the tailed files, then +@code{tail} may terminate long before any @var{file}s stop growing +or it may not terminate until long after the real writer process has +terminated. + @itemx --max-consecutive-size-changes=@var{n} @opindex --max-consecutive-size-changes This option is meaningful only when following by name. -- 2.47.3