Add a tail_until_writer_finished script.
This is useful for tailing Apache logs in a rigorous way. We don't want
to use 'tail -f' because it never terminates, even if the writer closes
the file. However, we can't just repeatedly reopen and read the file
without risking losing messages during log rotation. This script uses
inotify to detect when a writer to the tailed file closes the file.
Commit-Ready: Paul Hobbs <email@example.com>
Tested-by: Paul Hobbs <firstname.lastname@example.org>
Reviewed-by: Dan Shi <email@example.com>
2 files changed