[Python-Dev] pthreads, fork, import, and execvp

"Martin v. Löwis" martin at v.loewis.de
Thu May 18 20:24:33 CEST 2006


Ronald Oussoren wrote:
> Wouldn't this specific problem be fixed if os.fork were to acquire the
> import lock before calling fork(2)?

Right. Of course, you need to release the lock then both in the parent
and the child. Also, all places that currently do PyOs_AfterFork should
get modified (i.e. fork1, and forkpty also).

Regards,
Martin


More information about the Python-Dev mailing list