A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-July/127216.html below:

[Python-Dev] PEP 446: Add new parameters to configure the inherance of files and for non-blocking sockets

[Python-Dev] PEP 446: Add new parameters to configure the inherance of files and for non-blocking sockets [Python-Dev] PEP 446: Add new parameters to configure the inherance of files and for non-blocking socketsVictor Stinner victor.stinner at gmail.com
Sat Jul 6 14:43:24 CEST 2013
2013/7/6 Cameron Simpson <cs at zip.com.au>:
> Yes. Please forget I mentioned fork(); it is only relevant if you
> were offering some facility to undo the addition of cloexec to a
> Popen passed file descriptor. Which you are not.

Oh... gotcha. I now understood your concern.

There is a little "trick" here: at fork, file descriptors are
duplicated in the child process and almost all properties (open state,
flags, offset, etc.) are shared. There is one little exception: file
attributes are not shared, and there is only one file attribute:
O_CLOEXEC. Setting O_CLOEXEC in a child process does not affect the
flag in the parent process ;-) I will add a unit test to check this.

I modified the PEP to explain that, and I also mentioned the name of
the close-on-exec and blocking flags:
http://hg.python.org/peps/rev/425f831fddf7

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4