ActiveState/tail — pull request #20 by srid (2013-11-14 01:33:52+00:00)
Title: add Cleanup function to close open inotify watches

the Linux kernel doesn't automatically remove inotify watches added by the process after it exits. if a process like this crashes repeatedly, it could eventually lead to reaching the inotify limit.

this PR adds a `Cleanup` function to clean ALL inotify watches added by the tail package. it is meant to be invoked from the process's exit handler.