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
>
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
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
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 .
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