Doubts related to subprocess.Popen()

Diez B. Roggisch deets at nospam.web.de
Tue Jan 20 07:38:50 EST 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
three.

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.

Diez



More information about the Python-list mailing list