Using subprocess module to launch a shell shell script that itself forks a process

Samuel A. Falvo II sam.falvo at gmail.com
Wed Oct 8 14:53:05 EDT 2008


On Oct 8, 11:31 am, "Samuel A. Falvo II" <sam.fa... at gmail.com> wrote:
> I removed the stdin=PIPE argument, and this works.  Many thanks for
> bringing this to my attention.

OK, I am confused.  After observing a bug where the code works "every
other time", like clockwork, I've used strace to figure out what is
going on.  In the times when "it works," it's only the shell script
complaining that it's already running.

So, I'm right back to square one.  Even _without_ setting stdin=PIPE,
it fails to unblock.  I'm left utterly bewildered.

The only thing I can think of is that the JVM's stdout is tied to the
shell script's stdout, because that's the only way it can remain open
upon the termination of the child process.  I suppose, at this point,
the next place to look is in shell script syntax to find out how to
detach the JVM from the script's process group.



More information about the Python-list mailing list