And I have a signal handler that reaps the child and does a check for $? to get the status. However as expected, it returns the exit status of "com2". Is there any way to do what I want to do? I've tried looking at some other message boards and I think people get around it by playing around with named pipes and echoing each individual exit status back to the shell. What I want is to have the child process return the status of "com1" back to the parent. Is this possible? I'm sure it is possible but is there an elegant solution to it? Thanks in advance for any reply.if (fork()){ } else { exec "com1 | com2"; }
In reply to Returning status to parent from pipe by morrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |