I want to write a daemon that launches long-lived processes (it's a
backup robot.)
I can't have the daemon stand there waiting on the children,
backgrounding the system processes is necessary.
The background processes have an unfortunate tendency to lock-up. So the
daemon needs to be able to check on progress, kill hung tasks and
hopefully rollback…

I started using non-blocking fork/exec and reaping zombies with SIG
CHILD. I don't seem to be able to add SIG ALRM to the mix (I tried w/
alarm and ualarm), because some of my code currently uses sleep().

Since I might like a good sleep from time to time, I started looking at
Proc::Background and it seems to offer a solution. Cleaner than a
fork/exec sub, easy to get status from the objects so I could poll them
instead of using alarms. (Performance is not an issue, reliability is.)

So this is my question: what would you use to perform something similar
to fork/exec, with timeout/kill handling ?
(The final code will run in a Net:: Daemon loop, FWIW)

Thanks for any hint!


------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=96486

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss

Reply via email to