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>
In reply to Re: Different values when using $? to detect seg faults
by VSarkiss
in thread Different values when using $? to detect seg faults
by Gmong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |