Message383797
> Using close_fds=False, subprocess can use posix_spawn() which is safer and faster than fork+exec. For example, on Linux, the glibc implements it as a function using vfork which is faster than fork if the parent allocated a lot of memory. On macOS, posix_spawn() is even a syscall.
On Linux, unless you care specifically about users with Python 3.10+ on older kernels, implementing support for closerange() syscall in subprocess would provide better net benefit. This is because (a) performance advantage of posix_spawn() is no longer relevant on Linux after bpo-35823 and (b) supporting closerange() would benefit even those users who still need close_fds=True. |
|
Date |
User |
Action |
Args |
2020-12-26 09:20:51 | izbyshev | set | recipients:
+ izbyshev, gregory.p.smith, vstinner |
2020-12-26 09:20:51 | izbyshev | set | messageid: <1608974451.12.0.513093964637.issue42738@roundup.psfhosted.org> |
2020-12-26 09:20:51 | izbyshev | link | issue42738 messages |
2020-12-26 09:20:50 | izbyshev | create | |
|