in reply to quoted execution not working
Well... here's a few thoughts: first change how you are doing your forks:
Within your child process instead of using backticks you couold do the following: : handwaving : my $pid=fork(); if ( $pid == 0 } { : child process goes here } elsif { $pid > 0 ) { : parent process wait(); # Wait for the child to exit } else { # WOAH! We should never get here! die "fork returned $pid"; }
This way if you fail to fork off the grandchild you will see a diagnostic from die.: child open(PIPE,"some_command 2>&1 |") or die $!; my @output=<PIPD>; close PIPE; print @output;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: quoted execution not working
by dave_the_m (Monsignor) on Jul 27, 2004 at 23:44 UTC | |
by blue_cowdawg (Monsignor) on Jul 28, 2004 at 00:10 UTC |