<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Cameron Simpson</b> <span dir="ltr"><<a href="mailto:cs@zip.com.au">cs@zip.com.au</a>></span><br>
Date: Mon, Mar 12, 2012 at 1:04 AM<br>Subject: Re: Launching A Truly Disjoint Process<br>To: Dave Angel <<a href="mailto:d@davea.name">d@davea.name</a>><br>Cc: Ami Tavory <<a href="mailto:atavory@gmail.com">atavory@gmail.com</a>>, <a href="mailto:python-list@python.org">python-list@python.org</a><br>
<br><br><div class="im">On 11Mar2012 17:34, Dave Angel <<a href="mailto:d@davea.name">d@davea.name</a>> wrote:<br>
| On 03/11/2012 05:01 PM, Ami Tavory wrote:<br>
</div><div class="im">| >    I'm encountering a problem using the multiprocessing module to create a<br>
| > process that is truly disjoint from the parent process:...<br><br>
</div><div class="im">| Why not try using bash as an intermediate executable?  Have your first<br>
| python process invoke bash, giving it the arguments to in turn launch<br>
| the second python process.<br>
<br>
</div>Why use bash at all? That requires painful and inefficient argument quoting, etc.<br>
Just invoke Python itself directly i.e. get subprocess to fork/exec (aka<br>
spawn) a new invocation of Python instead of using execfile.<br>
<br> <br>  Dave, Cameron,<br><br>  Many thanks. I ran some initial tests regarding your suggestions, and things look good. <br></div></div>