[issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom()

STINNER Victor report at bugs.python.org
Mon Sep 9 05:40:43 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

> @Victor I mounted fdescfs on the buildbot workers to make the tests run faster. You're correct that it's not enabled by default.

Would it be possible to modify FreeBSD to enable it by default? Or is there a reason to not enable it by default?

> We're tracking this in our downstream bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221700 There's a patch there you may base something upstream on

Which patch? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221700#c3 or something else?


> Open question: closefrom(2) test in ./configure && ifdef __FreeBSD__ ?

No need to make closefrom test conditional depending on the platform. We have plently of tests which are platform specific but run on all platforms.

It's common that a function is first available on a single platform, but then available on more platforms.

It seems like closefrom() is available on:

* FreeBSD
* NetBSD: https://netbsd.gw.com/cgi-bin/man-cgi?closefrom++NetBSD-current
* OpenBSD: https://man.openbsd.org/closefrom.2
* Solaris: https://docs.oracle.com/cd/E23823_01/html/816-5168/closefrom-3c.html

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38061>
_______________________________________


More information about the Python-bugs-list mailing list