Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Chris Angelico
On Sat, Mar 22, 2014 at 5:16 AM, Mark H Harris wrote: > On 3/21/14 12:42 PM, Marko Rauhamaa wrote: >> >>http://docs.python.org/3/library/subprocess.html#popen-constructor> > > >> It's got the optional close_fds parameter, which is True by default. > > >> IOW, you don't need to do anything if y

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Mark H Harris
On 3/21/14 12:42 PM, Marko Rauhamaa wrote: http://docs.python.org/3/library/subprocess.html#popen-constructor> It's got the optional close_fds parameter, which is True by default. IOW, you don't need to do anything if you use subprocess.Popen() to start your child process. Incidentally,

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Marko Rauhamaa
Antony Joseph : > How can i implement multiprocessing without inherit file descriptors > from my parent process? Take a look at the subprocess module: http://docs.python.org/3/library/subprocess.html#popen-constructor> It's got the optional close_fds parameter, which is True by default. IOW,

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Grant Edwards
On 2014-03-21, Antony Joseph wrote: > How can i implement multiprocessing without inherit file descriptors from > my parent process? What one typically does if that is desired is to call fork() and then in the child process close all open file descriptors before doing any other processsing (such

Re: Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Mark H Harris
On 3/21/14 10:28 AM, Antony Joseph wrote: How can i implement multiprocessing without inherit file descriptors from my parent process? I'll bite... If what you mean by 'multiprocessing' is forking a process, to get a child process, which will then do some parallel processing for some reason,

Implement multiprocessing without inheriting parent file handle

2014-03-21 Thread Antony Joseph
Hi all, How can i implement multiprocessing without inherit file descriptors from my parent process? Please help me. regards, Antony -- https://mail.python.org/mailman/listinfo/python-list