Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2716d53

Browse files
committed
fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.
1 parent c99b512 commit 2716d53

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ Core and Builtins
206206
Library
207207
-------
208208

209+
- fcntl: add F_DUPFD_CLOEXEC constant, available on Linux 2.6.24+.
210+
209211
- Issue #15972: Fix error messages when os functions expecting a file name or
210212
file descriptor receive the incorrect type.
211213

Modules/fcntlmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,9 @@ all_ins(PyObject* d)
461461
#ifdef F_DUPFD
462462
if (ins(d, "F_DUPFD", (long)F_DUPFD)) return -1;
463463
#endif
464+
#ifdef F_DUPFD_CLOEXEC
465+
if (ins(d, "F_DUPFD_CLOEXEC", (long)F_DUPFD_CLOEXEC)) return -1;
466+
#endif
464467
#ifdef F_GETFD
465468
if (ins(d, "F_GETFD", (long)F_GETFD)) return -1;
466469
#endif

0 commit comments

Comments
 (0)