Implement multiprocessing without inheriting parent file handle
marko at pacujo.net
Fri Mar 21 18:42:19 CET 2014
Antony Joseph <antonyjoseph89 at gmail.com>:
> How can i implement multiprocessing without inherit file descriptors
> from my parent process?
Take a look at the subprocess module:
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, that's the preferred way.
More information about the Python-list