Christian Heimes added the comment:
That's the way fork() and the subprocess module work. Please follow Serhiy's
advice.
--
nosy: +christian.heimes
resolution: -> rejected
stage: -> committed/rejected
status: open -> closed
type: -> behavior
___
P
Serhiy Storchaka added the comment:
You should use some kind of inter-process communication to synchronize your
processes.
In particular, for get rid of a temporary script file you can either send
script via pipe:
p = Popen([sys.executable], stdin=PIPE)
p.stdin.write(longscript)
or u
Charles-François Natali added the comment:
I may be missing something, but nothing's wrong here.
When you start a subprocess, the child process keeps running (in background).
If you want to wait for its termination, just use p.wait() or p.communicate().
--
nosy: +neologix
_
New submission from anatoly techtonik:
Currently, when interpreter is launched it returns immediately to parent
process without waiting to read the entrypoint script. This causes problem when
you need to remove this script after executing.
Is it possible to delay return to child process until