in reply to Different values when using $? to detect seg faults
Is there simply something wrong in my code?I think so. This line is subtly wrong: my $execTwo = "$command &> log ";You're not just re-directing there, you're also starting the command in the background. To redirect both stderr and stdout you'd need >&, not &>. So you're getting the return value of the shell, not your program.
<waffle>I may be mis-reading your code, but I think that's what's happening.</waffle>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Different values when using $? to detect seg faults
by graff (Chancellor) on Mar 08, 2005 at 04:11 UTC | |
|
Re^2: Different values when using $? to detect seg faults
by jpeg (Chaplain) on Mar 08, 2005 at 01:37 UTC |