summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/fcntlmodule.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index d073441..4da0b8c 100644
--- 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.
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 5509026..bc2c181 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -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