<p dir="ltr">Yes, but I'm not interested to write such doc.</p>
<p dir="ltr">Victor</p>
<div class="gmail_quote">Le 15 sept. 2013 10:34, "Georg Brandl" <<a href="mailto:g.brandl@gmx.net">g.brandl@gmx.net</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 08/28/2013 01:20 AM, victor.stinner wrote:<br>
> <a href="http://hg.python.org/cpython/rev/ef889c3d5dc6" target="_blank">http://hg.python.org/cpython/rev/ef889c3d5dc6</a><br>
> changeset:   85420:ef889c3d5dc6<br>
> user:        Victor Stinner <<a href="mailto:victor.stinner@gmail.com">victor.stinner@gmail.com</a>><br>
> date:        Wed Aug 28 00:53:59 2013 +0200<br>
> summary:<br>
>   Issue #18571: Implementation of the PEP 446: file descriptors and file handles<br>
> are now created non-inheritable; add functions os.get/set_inheritable(),<br>
> os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().<br>
<br>
> +.. _fd_inheritance:<br>
> +<br>
> +Inheritance of File Descriptors<br>
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
> +<br>
> +A file descriptor has a inheritable flag which indicates if the file descriptor<br>
> +can be inherited or not in child processes. Since Python 3.4, file descriptors<br>
> +created by Python are non-inheritable by default.<br>
> +<br>
> +On UNIX, non-inheritable file descriptors are closed in child processes at the<br>
> +execution of a new program, other file descriptors are inherited.<br>
> +<br>
> +On Windows, non-inheritable handles and file descriptors are closed in child<br>
> +processes, except standard streams (file descriptors 0, 1 and 2: stdin, stdout<br>
> +and stderr) which are always inherited. Using :func:`os.spawn*` functions,<br>
> +all inheritable handles and all inheritable file descriptors are inherited.<br>
> +Using the :mod:`subprocess` module, all file descriptors except standard<br>
> +streams are closed, inheritable handles are only inherited if the *close_fds*<br>
> +parameter is ``False``.<br>
> +<br>
> +.. versionadded:: 3.4<br>
> +<br>
> +.. function:: get_inheritable(fd)<br>
> +<br>
> +   Get the `inheritable flag <fd_inheritance>`_ of the specified file<br>
> +   descriptor. Return a :class:`bool`.<br>
> +<br>
> +.. function:: set_inheritable(fd, inheritable)<br>
> +<br>
> +   Set the `inheritable flag <fd_inheritance>`_ of the specified file descriptor.<br>
> +<br>
> +.. function:: get_handle_inheritable(handle)<br>
> +<br>
> +   Get the `inheritable flag <fd_inheritance>`_ of the specified handle. Return a :class:`bool`.<br>
> +<br>
> +   Availability: Windows.<br>
> +<br>
> +.. function:: set_handle_inheritable(handle, inheritable)<br>
> +<br>
> +   Set the `inheritable flag <fd_inheritance>`_ of the specified handle.<br>
> +<br>
> +   Availability: Windows.<br>
> +<br>
<br>
"Handle" is used nowhere else in the os module documentation.  Do you think it<br>
would make sense to have a brief paragraph on what are possible handles under<br>
Windows (and that file descriptors aren't handles)?<br>
<br>
Georg<br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com" target="_blank">https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com</a><br>
</blockquote></div>