Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-27 Thread Victor Stinner
2013/8/27 Antoine Pitrou : >> On UNIX, the subprocess module closes almost all file descriptors in >> the child process. This operation requires MAXFD system calls, where >> MAXFD is the maximum number of file descriptors, even if there are >> only few open file descriptors. This maximum can be rea

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-27 Thread Antoine Pitrou
Hi, I have a small comment to make: > On UNIX, the subprocess module closes almost all file descriptors in > the child process. This operation requires MAXFD system calls, where > MAXFD is the maximum number of file descriptors, even if there are > only few open file descriptors. This maximum ca

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-26 Thread Guido van Rossum
Wow, that was quick! I propose that we wait for one more day for any feedback from others in response to this post, and then accept the PEP. On Mon, Aug 26, 2013 at 3:19 PM, Victor Stinner wrote: > 2013/8/26 Guido van Rossum : > > I have reviewed the PEP and I think it is good. Thank you so much

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-26 Thread Victor Stinner
2013/8/26 Guido van Rossum : > I have reviewed the PEP and I think it is good. Thank you so much for > pushing this topic and for your very thorough review of all the feedback, > related issues and so on. It is an exemplary PEP! Thanks :-) I updated the PEP: http://hg.python.org/peps/rev/edd8250f6

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-26 Thread Guido van Rossum
Hi Victor, I have reviewed the PEP and I think it is good. Thank you so much for pushing this topic and for your very thorough review of all the feedback, related issues and so on. It is an exemplary PEP! I've made a bunch of small edits (mostly to improve grammar slightly, hope you don't mind) a

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-26 Thread Guido van Rossum
On Fri, Aug 23, 2013 at 1:30 PM, Charles-François Natali wrote: >> About your example: I'm not sure that it is reliable/portable. I sa >> daemon libraries closing *all* file descriptors and then expecting new >> file descriptors to become 0, 1 and 2. Your example is different >> because w is still

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-23 Thread Charles-François Natali
> About your example: I'm not sure that it is reliable/portable. I sa > daemon libraries closing *all* file descriptors and then expecting new > file descriptors to become 0, 1 and 2. Your example is different > because w is still open. On Windows, I have seen cases with only fd 0, > 1, 2 open, and

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-23 Thread Victor Stinner
Hi, I will try to answer to your worries. Tell me if I should complete the PEP with these answers. 2013/8/23 Charles-François Natali : > Why does dup2() create inheritable FD, and not dup()? Ah yes, there were as section explaining it. In a previous version of the PEP (and its implementation), o

Re: [Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-23 Thread Charles-François Natali
Hello, A couple remarks: > The following functions are modified to make newly created file descriptors > non-inheritable by default: > [...] > os.dup() then > os.dup2() has a new optional inheritable parameter: os.dup2(fd, fd2, > inheritable=True). fd2 is created inheritable by default, but n

[Python-Dev] PEP 446 (make FD non inheritable) ready for a final review

2013-08-22 Thread Victor Stinner
Hi, I know that I wrote it more than once, but I consider that my PEP 446 is now ready for a final review: http://www.python.org/dev/peps/pep-0446/ The implementation is also working, complete and ready for a review. http://hg.python.org/features/pep-446 http://bugs.python.org/issue18571 I run