Doubts related to subprocess.Popen()

Diez B. Roggisch deets at
Tue Jan 20 13:38:50 CET 2009

srinivasan srinivas wrote:

> Hi,
> 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?

Usually, each new process has three file-descriptors associated with it -
stdin,stdout and stderr.

So when you span a process, the overall count of FDs should increase by

Additionally, there are more FDs created if you chose to pipe communication
between the child-process and the parent.

This is a unix-thing btw, nothing to do with subprocess per se.


More information about the Python-list mailing list