in reply to how to make a demon in perl?
Your program should "chdir '/'" or the equivalent if at all possible, so you don't keep a working directory on a mounted device.
If the device has to be unmounted for maintenance, it would be "busy" and locked if your process still has its current working directory there.
That's not usually a problem for non-daemon processes, since the sysadmin can boot off all interactive users without taking the system down. But if you're "half-daemonized", they'll either have to track down which process has the directory in use, or reboot the box.
If you're going to be logging to a file, chdir to that directory; that way, only one filesystem is locked down.
--
Mike
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: how to make a demon in perl?
by Sihal (Pilgrim) on Oct 01, 2002 at 12:52 UTC | |
by RMGir (Prior) on Oct 01, 2002 at 13:03 UTC | |
by Sihal (Pilgrim) on Oct 01, 2002 at 13:47 UTC | |
by zigdon (Deacon) on Oct 01, 2002 at 13:28 UTC |