On Sat, Jan 21, 2012 at 2:52 PM, Antoine Pitrou <solip...@pitrou.net> wrote:
> On Sat, 21 Jan 2012 23:39:41 +0100
> gregory.p.smith <python-check...@python.org> wrote:
>> http://hg.python.org/cpython/rev/61aa484a3e54
>> changeset:   74563:61aa484a3e54
>> branch:      3.2
>> parent:      74561:d01fecadf3ea
>> user:        Gregory P. Smith <g...@krypto.org>
>> date:        Sat Jan 21 14:01:08 2012 -0800
>> summary:
>>   Fixes issue #8052: The posix subprocess module's close_fds behavior was
>> suboptimal by closing all possible file descriptors rather than just
>> the open ones in the child process before exec().
>
> For what it's worth, I'm not really confident with so much new low-level
> code in a bugfix release.
> IMHO it's more of a new feature, since it's a performance improvement.

No APIs change and it makes the subprocess module usable on systems
running with high file descriptor limits where it was painfully slow
to use in the past.

This was a regression in behavior introduced with 3.2's change to make
close_fds=True be the (quite sane) default so I do consider it a fix
rather than a performance improvement.

Obviously the final decision rests with the 3.2.3 release manager.

For anyone uncomfortable with the code itself: The equivalent of that
code has been in use in production at work continuously in
multithreaded processes across a massive number of machines running a
variety of versions of Linux for many years now.  And the non-Linux
code is effectively what the Java VM's Process module does.

-gps
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to