RE: Getting return code from process launched from exec

2004-04-14 Thread Jason Normandin
D'oh ! Not sure how I missed that. Thanks! That did the trick. -Jason -Original Message- From: Steve Grazzini [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 12:57 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Getting return code from process launched from

Re: Getting return code from process launched from exec

2004-04-14 Thread Steve Grazzini
[EMAIL PROTECTED] wrote: defined (my $pid = fork) or die "Cannot fork process : $!"; unless ($pid){ exec "$Command"; die "Cannot exec : $Command : $!"; waitpid($pid,0); } The waitpid() is unreachable there. Try putting it outside the unless() block, so that the parent will execute