Fwd: Launching A Truly Disjoint Process

Ami Tavory atavory at gmail.com
Mon Mar 12 04:41:09 EDT 2012


---------- Forwarded message ----------
From: Cameron Simpson <cs at zip.com.au>
Date: Mon, Mar 12, 2012 at 1:04 AM
Subject: Re: Launching A Truly Disjoint Process
To: Dave Angel <d at davea.name>
Cc: Ami Tavory <atavory at gmail.com>, python-list at python.org


On 11Mar2012 17:34, Dave Angel <d at davea.name> wrote:
| On 03/11/2012 05:01 PM, Ami Tavory wrote:
| >    I'm encountering a problem using the multiprocessing module to
create a
| > process that is truly disjoint from the parent process:...

| Why not try using bash as an intermediate executable?  Have your first
| python process invoke bash, giving it the arguments to in turn launch
| the second python process.

Why use bash at all? That requires painful and inefficient argument
quoting, etc.
Just invoke Python itself directly i.e. get subprocess to fork/exec (aka
spawn) a new invocation of Python instead of using execfile.


  Dave, Cameron,

  Many thanks. I ran some initial tests regarding your suggestions, and
things look good.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120312/fb13f8e1/attachment.html>


More information about the Python-list mailing list