in reply to Re: Returning status to parent from pipe
in thread Returning status to parent from pipe

Thanks for the suggestion. However I am trying to figure out how easily I could integrate that into my code. I left out some of the details, but basically I am forking a series of commands which I first predefine. Some have single commands and some are combinations of commands. I can always do a "hack" by breaking up the commands e.g
job[0] = "com1 | com 2" job[1] = "com3" . . . job[n] = "com100"
can become
job[0] = "com1 > tmp.out" job[1] = "cat tmp.out >com2" job[3] = "com3" . . . job[n+1] = "com100"
Ideally I was trying to find a solution like Crackers2's suggestion where I can do some "magic" on each command to get it to return the first exit code. I will play around with that for a while and see if I can do that