In ExecOne there are no shell metacharacters in the single argument to system, so the shell is not invoked and your script is parent to the system call.
In ExecTwo there are metacharacters in the single argument, so the shell is invoked to run the command, and that shell is the parent. You are seeing the exit status of that shell process.
After Compline,
Zaxo
In reply to Re: Different values when using $? to detect seg faults
by Zaxo
in thread Different values when using $? to detect seg faults
by Gmong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |