multiprocessing module backport from 3 to 2.7 - spawn feature
andres.riancho at gmail.com
Wed Jan 28 20:04:29 CET 2015
On Wed, Jan 28, 2015 at 3:06 PM, Skip Montanaro
<skip.montanaro at gmail.com> wrote:
> On Wed, Jan 28, 2015 at 7:07 AM, Andres Riancho <andres.riancho at gmail.com>
>> The feature I'm specially interested in is the ability to spawn
>> processes  instead of forking, which is not present in the 2.7
>> version of the module.
> Can you explain what you see as the difference between "spawn" and "fork" in
> this context?
Well, fork is a system call  where a process creates a copy of
itself, usually using COW . This copy receives a new process ID and
is slightly dependent on the parent: they share the same address
Spawn, and I took that from the multiprocessing 3 documentation, will
create a new process without using fork(). This means that no memory
is shared between the MainProcess and the spawn'ed sub-process created
My goal is to prevent dead-locks and other issues  which come
from forking a multithreaded program (situation I'm in right now).
 See "Note that safely forking a multithreaded process is
> Are you using Windows perhaps? I don't know anything obviously
> different between the two terms on Unix systems.
Nope, I'm on linux
Project Leader at w3af - http://w3af.org/
Web Application Attack and Audit Framework
More information about the Python-list