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 in the Parent here, do monitoring of the child
} else {
        # I am in the child here.. check stuff and send it to the parent
        exit 0;  # Don't want to continue past what the child should do
}

Note 1: Error checking is left as an exercise for the reader.
Note 2: If you need more than one child, wrap the whole thing in a loop
        of some sort, and use next inside the if()

-- 
Mother is the name for GOD on the lips and
hearts of all children.  - Eric Draven

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to