in reply to Re^5: parent process stuck in read(2) on pipe opened to child process using backtick
in thread parent process stuck in read(2) on pipe opened to child process using backtick

I am not sure it would work as advertised, but I woudl try something like
bash -i -c '(HERE GOES THE ORIGINAL CODE OF a.sh) & echo $!'
Update: The echo would probably mess with the backticks. I should not link to a material I am not so familiar with :-)
  • Comment on Re^6: parent process stuck in read(2) on pipe opened to child process using backtick
  • Download Code

Replies are listed 'Best First'.
Re^7: parent process stuck in read(2) on pipe opened to child process using backtick
by Eliya (Vicar) on Feb 15, 2012 at 02:18 UTC

    I don't think this would work (for several reasons).  Also, the -c '...' would result in a quoting mess with any real script code.

    I you think differently, please provide a complete modified a.sh, which, when killed, kills its subprocesses, but not the calling process.