From ffc50e4d32706b8962d66cadd21fcd1d0cd58f13 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 29 Jul 2013 11:39:49 -0700 Subject: [PATCH] FreeBSD: don't use /dev/fd, bug #478446 --- pym/portage/process.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pym/portage/process.py b/pym/portage/process.py index 728a01daf..92f2aba0c 100644 --- a/pym/portage/process.py +++ b/pym/portage/process.py @@ -39,6 +39,10 @@ for _fd_dir in ("/proc/self/fd", "/dev/fd"): else: _fd_dir = None +# /dev/fd does not work on FreeBSD, see bug #478446 +if platform.system() in ('FreeBSD',) and _fd_dir == '/dev/fd': + _fd_dir = None + if _fd_dir is not None: def get_open_fds(): return (int(fd) for fd in os.listdir(_fd_dir) if fd.isdigit()) -- 2.26.2