On Wed, Aug 14, 2002 at 08:38:06AM -0700, Ahmed Moustafa wrote:
> $! says 'No child processes'. Does that have something to do with having
> $SIG{CHLD} = 'IGNORE';
> in the code?
Yes, that is probably the reason. However, I cannot duplicate your problem
with perl v5.6.1. Are you using an older version, or perhaps doing
something else, such as calling wait() yourself?
The only way I was able to encounter a similar problem was with this code:
#!/usr/bin/perl -wl
$SIG{CHLD} = 'IGNORE';
print system("cat /dev/null");
print wait();
print $?;
print $!;
The code prints the following:
0
-1
-1
No child processes
The system() call does not return -1, but the wait() does, and it set $? to
-1.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]