in reply to Re: Read entire file then clear while flocking
in thread Read entire file then clear while flocking

Hi Roboticus,

My fear with doing that was that if mail was being written to the spool file when I try to rename it, it will lose that email. If, however, mv recognizes a locked file then I am golden. Would you happen to know if it does?

  • Comment on Re^2: Read entire file then clear while flocking

Replies are listed 'Best First'.
Re^3: Read entire file then clear while flocking
by roboticus (Chancellor) on Nov 05, 2011 at 15:12 UTC

    citycrew:

    Sorry, I don't know that. If it's a unix box, though, renaming it won't affect the processes that have it open. So you could potentially rename it and wait a while (giving other jobs a chance to finish using it) and *then* process it. Hopefully someone a bit more knowledgeable about the Unix filesystem will chime in. I'm even less knowledgeable about windows filesystems (except for FAT12/16, yech!)...

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.