Doubts related to subprocess.Popen()

Mark Wooding mdw at distorted.org.uk
Tue Jan 20 13:46:17 CET 2009


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.

-- [mdw]



More information about the Python-list mailing list