Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
Hrm.. didn't think of that ... *heh* Good idea ... I'm gonna use the Proc::Daemon module though .. seems to do exactly what I need without messing with forking directly... On Mon, 2002-11-18 at 21:29, Steve Grazzini wrote: > That's all more or less correct, but you're missing a fundamental >

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Steve Grazzini
Jason Frisvold <[EMAIL PROTECTED]> wrote: > I'm writing a monitoring system (Yes, still... Finally got the > go-ahead to do this) and my design calls for a central "Smart" > Daemon that spawns and monitors the lesser Daemons that do the > actual monitoring. My problem is that I'm not sure how

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
I believe I have an answer to this now ... In talking with a local perl programmer, he mentioned the Daemon modules on CPAN. I did some research and it looks like I can use the Proc::Daemon module to do exactly what I want. Basically, it forks itself immediately and "detaches" itself from the

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
But, if I go the way of the fork, the program cannot be broken down into lots of mini-programs which are designed to do a single job.. everything would have to be rolled into one larger program with (I'm guessing here) multiple fork points to handle each different type of system I'm trying to run .

Re: System/Exec/Fork ... Help!

2002-11-18 Thread Alan Cameron
On 18 Nov 2002 15:21:26 -0500, Jason Frisvold <[EMAIL PROTECTED]> wrote: [snip] > I can't see to figure out how to spawn a new process, return the pid, > and be able to monitor this new process on my own ... The general form would be something like: my $pid = fork(); if ($pid) { # I am