Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Writing to flock files in a daemonby graq (Curate) |
on Mar 07, 2002 at 09:12 UTC ( [id://149970]=perlquestion: print w/replies, xml ) | Need Help?? |
graq has asked for the wisdom of the Perl Monks concerning the following question:
Hi again Monks.
Well, depending on your definition, what I am writing may not be a daemon. However, what I want is for my script to be running in the background and for it to be unique in the process list. I came across some behaviour that I do not understand, and am seeking clarification. The point being that a third party script (or process) can run which checks that the PID in the file matches that in the process list. Pretend, if you will, that I am overly paranoid and must be assured that there is only ever one of these scripts running. :) Please bear in mind that the code has been altered somewhat to work for this particular snippet.
Back to
Seekers of Perl Wisdom
|
|