diff options
author | David CARLIER <devnexen@gmail.com> | 2020-11-19 07:24:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 07:24:15 (GMT) |
commit | 13b865f0e17c88b081c23f7f05cf91166d220a50 (patch) | |
tree | c2bd71007ddf4ae2e8c2ada73cdf31a2f67e6f96 /Modules | |
parent | 4687338d0ed46e1f5f5060536becf8a96496bae7 (diff) | |
download | cpython-13b865f0e17c88b081c23f7f05cf91166d220a50.zip cpython-13b865f0e17c88b081c23f7f05cf91166d220a50.tar.gz cpython-13b865f0e17c88b081c23f7f05cf91166d220a50.tar.bz2 |
bpo-42375: subprocess DragonFlyBSD build update. (GH-23320)
Same as FreeBSD, file descriptors in /dev/fd id from 0 to 63.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_posixsubprocess.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index a00e137..1abe235 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -55,7 +55,7 @@ # endif #endif -#if defined(__FreeBSD__) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__FreeBSD__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__DragonFly__) # define FD_DIR "/dev/fd" #else # define FD_DIR "/proc/self/fd" @@ -127,9 +127,9 @@ _pos_int_from_ascii(const char *name) } -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) /* When /dev/fd isn't mounted it is often a static directory populated - * with 0 1 2 or entries for 0 .. 63 on FreeBSD, NetBSD and OpenBSD. + * with 0 1 2 or entries for 0 .. 63 on FreeBSD, NetBSD, OpenBSD and DragonFlyBSD. * NetBSD and OpenBSD have a /proc fs available (though not necessarily * mounted) and do not have fdescfs for /dev/fd. MacOS X has a devfs * that properly supports /dev/fd. @@ -377,7 +377,7 @@ _close_open_fds_maybe_unsafe(long start_fd, PyObject* py_fds_to_keep) ++start_fd; #endif -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__DragonFly__) if (!_is_fdescfs_mounted_on_dev_fd()) proc_fd_dir = NULL; else |