on Mon, 26 Aug 2002 14:15:02 GMT, [EMAIL PROTECTED] (Chad
Kellerman) wrote: 

> I have been trying to work on a script that does forking. 
> But the script dies in the fork.  Here is what I have:

> [...]

> my $child_limit = 1;
> my $child_pids = 0;
> $SIG{CHLD} = \&CHILD_COUNT($child_limit);

You can't have arguments here. This line should be:

    $SIG{CHLD} = \&CHILD_COUNT;

> [...]

> sub CHILD_COUNT {
>         my $child_limit = @_;
          ^^^^^^^^^^^^^^^^^^^^^

Remove this line, so you essentially work with the my-variable
$child_limit declared at file scope at the top of your program. 

-- 
felix

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

Reply via email to