I'm guessing that you have a buffering problem. There can be a substantial delay between when the script "writes" into the file, and the next event that can cause I/O buffers to be flushed. Consult your favorite reference for instructions on unbuffering (hint: it'll invole the single argument form of select() ).
You're also openning the lock file in "append" mode. Better to just truncate and rewrite.
In reply to Re: Writing to flock files in a daemon
by dws
in thread Writing to flock files in a daemon
by graq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |