Doubts related to subprocess.Popen()
sri_annauni at yahoo.co.in
Tue Jan 20 15:19:33 CET 2009
Do parent process will have different file descriptor in it for each subprocesses or paprent uses a single file descriptor for all?
I really want to know creation of each subprocess will occupy an entry in parents'file descriptor table. B'cos if i create more than 200 subprocesses, i am getting 'Too many open files' error.
----- Original Message ----
From: Mark Wooding <mdw at distorted.org.uk>
To: python-list at python.org
Sent: Tuesday, 20 January, 2009 6:16:17 PM
Subject: Re: Doubts related to subprocess.Popen()
srinivasan srinivas <sri_annauni at yahoo.co.in> writes:
> Does subprocess.Popen() count a new open file for each suprocess? I
> mean does it occupy an entry in file descriptor table of parent
> process? If so, wat is each file descriptor connected to?
On Unix, subprocess.Popen will use up a file descriptor in the parent
for each use of subprocess.PIPE. The descriptor in question is one end
of a pipe; the child process holds the other end.
I guess the situation is similar on Windows, but I don't know for sure.
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
More information about the Python-list