This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients docs@python, martin.panter, socketpair, vstinner
Date 2016-05-29.08:10:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464509427.68.0.396436938394.issue27150@psf.upfronthosting.co.za>
In-reply-to
Content
I don’t see any violation or anything needing fixing in the documentation or code. Can you elaborate?

The fcntl() documentation says “The values used for ‘cmd’ [F_DUPFD, etc] are operating system dependent, and are available as constants in the ‘fcntl’ module, using the same names as used in the relevant C header files.” The newest version of Posix specifies both the F_DUPFD and F_DUPFD_CLOEXEC. It would be misleading for Python to use one when the user specified the other.

If you want a best-effort version of F_DUPFD_CLOEXEC for a single-threaded program, why not use os.dup()? I presume this uses F_DUPFD_CLOEXEC where appropriate, and uses some non-atomic fallback if necessary.
History
Date User Action Args
2016-05-29 08:10:27martin.pantersetrecipients: + martin.panter, vstinner, docs@python, socketpair
2016-05-29 08:10:27martin.pantersetmessageid: <1464509427.68.0.396436938394.issue27150@psf.upfronthosting.co.za>
2016-05-29 08:10:27martin.panterlinkissue27150 messages
2016-05-29 08:10:27martin.pantercreate