[Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Mon Jan 14 13:15:49 CET 2013
- Previous message: [Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors
- Next message: [Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jan 14, 2013 at 9:23 PM, Victor Stinner <victor.stinner at gmail.com> wrote:
XXX Should
subprocess.Popen
set the close-on-exec flag on file XXX XXX descriptors of the constructor thepassfds
argument? XXXWhat? Setting them cloexec would prevent them from being inherited in the child process! Oops, it's just the opposite: passfds should (must?) clear the flag :-) (I'm not sure of what should be done here.)
Turning off a security feature implicitly isn't a good idea. If someone passes such a descriptor, their child application will fail noisily - it's then up to the developer to decide if they passed the wrong file descriptor, or simply need to ensure the one they passed remains open in the child process.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors
- Next message: [Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]