szabgab has asked for the wisdom of the Perl Monks concerning the following question:
I also have to provide a way to stop the daemon$ daemon start Running... $ daemon start Is already running...
It would be also nice if I could also ask the status that could say if the daemon is running or not. E.g.$ daemon stop Exiting ...
The daemon is currently creating a file $HOME/.daemon with it PID as the content and when I run daemon stop the new process sends KILL to the PID it finds in the file. But what if the original daemon crashed and not there is a totally unrelated process with that PID? Any code examples ?$ daemon staus Daemon is running
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: One process at a time
by merlyn (Sage) on Aug 25, 2005 at 15:36 UTC | |
|
Re: One process at a time
by fmerges (Chaplain) on Aug 25, 2005 at 16:21 UTC | |
|
Re: One process at a time
by sgifford (Prior) on Aug 25, 2005 at 16:25 UTC | |
|
Re: One process at a time
by philcrow (Priest) on Aug 25, 2005 at 16:09 UTC |