Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
tomazos,
I had a similar issue (at least the checking if the script is already running) and they way i handled it is by creating a simple file (not necessarily locked). Every time the script starts it checks for .iamrunning file. If it exists then it just dies or exits without doing any processing or it creates one and starts the process. If you want it to come back after system boot then you can put it as cron job or you can add it to your .cshrc/.bashrc or whatever you shell start up is. regarding the kill - are you talking about Kill signals? Then you can use SIG INT to handle that part If you are interested in locking i would do perldoc -f flock cheers SK In reply to Re: Writing a Perl Daemon
by sk
|
|