[Pythonmac-SIG] forking in python
mwh at python.net
Wed Oct 15 08:14:15 EDT 2003
"William McLendon" <txagcs98 at hotmail.com> writes:
> I've got a script where I want to fork one child thread that goes off
> to execute a sequence of other scripts, using popen or whatever. I
> don't care what it uses to launch them, but it needs to be something
> that serializes all the launches.
> I can get it working, but it looks like the main thread blocks till
> after the child thread is finished running all the processes in its
> How can I make this so that the main thread doesn't block? I'd like
> it to be able to do other stuff during this time.
Not sure I understand, but aren't things like spawn*(P_NOWAIT, ...),
wait() and waitpid() what you're looking for?
y'rs - tim
-- Tim Peters dishes out versioning advice on python-dev
More information about the Pythonmac-SIG