Hi *, I noticed that 'tail --pid' does not work when the file to follow is a FIFO. Shouldn't --pid behave the same regardless whether it's a pipe or not?
# Good case. $ rm f; touch f # tail to follow regular file. $ sleep 5 & timeout 10 tail -f --pid=$! f; echo $? [3] 1030528 [3]+ Done sleep 5 0 # Bad case. $ rm f; mkfifo f # tail to follow a FIFO file. $ sleep 5 & timeout 10 tail -f --pid=$! f; echo $? [3] 1030559 [3]+ Done sleep 5 124 Looking at strace output, one can see that kill() is only invoked once in the FIFO case. FWIW: it doesn't make a difference whether one uses -f or -F, whether the monitored file is written to by another process or stays empty, or whether one tries with the --sleep-interval option. Have a nice day, Berny