If you're using the bash shell something like this might work:
if (fork()){ } else { exec 'com1 | com2; exit $PIPESTATUS[0]'; }
You can read more about this in the bash manual.
In reply to Re: Returning status to parent from pipe
by Crackers2
in thread Returning status to parent from pipe
by morrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |