]> granicus.if.org Git - python/commitdiff
fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 7 Jan 2013 23:52:40 +0000 (00:52 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 7 Jan 2013 23:52:40 +0000 (00:52 +0100)
Misc/NEWS
Modules/fcntlmodule.c

index d073441427c5924e8a35d9b29402dd0ba2448ee6..4da0b8c7aefc465f6b70e6054727b42c330d63bc 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -206,6 +206,8 @@ Core and Builtins
 Library
 -------
 
+- fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.
+
 - Issue #15972: Fix error messages when os functions expecting a file name or
   file descriptor receive the incorrect type.
 
index 550902690c7bb0838ef05cd4ced88500a2477b48..bc2c181dce1613ab9e5e3373d89425c9b055c5f8 100644 (file)
@@ -461,6 +461,9 @@ all_ins(PyObject* d)
 #ifdef F_DUPFD
     if (ins(d, "F_DUPFD", (long)F_DUPFD)) return -1;
 #endif
+#ifdef F_DUPFD_CLOEXEC
+    if (ins(d, "F_DUPFD_CLOEXEC", (long)F_DUPFD_CLOEXEC)) return -1;
+#endif
 #ifdef F_GETFD
     if (ins(d, "F_GETFD", (long)F_GETFD)) return -1;
 #endif