check for log file truncation fixes #55
check for log file truncation fixes #55

This adds a simple check for log file truncation and resets the watch
when detected.

There do exist 2 race conditions here:
1. Any log data written prior to truncation which beaver has not yet
   read and processed is lost. Nothing we can do about that.
2. Should the file be truncated, rewritten, and end up being larger than
   the original file during the sleep interval, beaver won't detect
   this. After some experimentation, this behavior also exists in GNU
   tail, so I'm going to call this a "don't do that then" bug :)

   Additionally, the files beaver will most likely be called upon to
   watch which may be truncated are generally going to be large enough
   and slow-filling enough that this won't crop up in the wild.

jlambert121/beaver,davidmoravek/python-beaver,zuazo-forks/beaver,imacube/python-beaver,imacube/python-beaver,doghrim/python-beaver,zuazo-forks/beaver,python-beaver/python-beaver,Open-Party/python-beaver,doghrim/python-beaver,PierreF/beaver,jlambert121/beaver,josegonzalez/python-beaver,Appdynamics/beaver,davidmoravek/python-beaver,josegonzalez/python-beaver,thomasalrin/beaver,Open-Party/python-beaver,thomasalrin/beaver,rajmarndi/python-beaver,PierreF/beaver,timstoop/python-beaver,timstoop/python-beaver,rajmarndi/python-beaver,python-beaver/python-beaver,Appdynamics/beaver