On Thursday 20 May 2010, you wrote:
> Bash coprocesses and the "wait" built-in:
> 
>     $ coproc FIREFOX (firefox)
>     [1] 32413
>     $ echo $FIREFOX_PID
>     32413
>     $ echo ${FIREFOX[0]}
>     63
>     $ echo ${FIREFOX[1]}
>     60
>     $ wait $FIREFOX_PID && echo Good || echo No good
> 
> Nothing happens until you exit Firefox ...
> 
>     [1]+  Done                    coproc FIREFOX ( firefox )
>     Good
> 
> I haven't tried hooking up to the stdin and stdout of a coprocess yes,
> but that's what the FIREFOX[0] and [1] file descriptors are for,
> apparently. See man bash.
> 
> Douglas.
> 

This thread seems to have a solution;

http://www.linuxforums.org/forum/linux-programming-scripting/72247-capture-exit-status-pid-bash.html

Cheers Ross Drummond

Reply via email to