[issue6559] add pass_fds paramter to subprocess.Popen()

Ferringb report at bugs.python.org
Tue Jan 17 03:17:07 CET 2012


Ferringb <ferringb at gmail.com> added the comment:

Just noticed this patch... aside from liking the intention, the api for this is going to grow tiresome quick since it expects the FDs to already be in place; is there any reasons a mapping wasn't used here, specifically of (src_fd|src_fileobj) -> target_fd ?

If that was fed in, post fork the client can shuffle around the fd's into appropriate positions- something the parent may not be able to do (threaded environment for example, or async in some respect).

I've had similar functionality in my own process code for a while, and have found it to be generally pretty easy to deal with- for subprocess it has the added benefit that the existing stdin/stdout/stderr bits could be pretty easily folded directly into it.

So... any reason this route wasn't considered, or just wasn't thought about?

----------
nosy: +ferringb

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6559>
_______________________________________


More information about the Python-bugs-list mailing list