Bug 24715 – std/process: Default to libc `closefrom` in spawnProcessPosix
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-08-23T04:59:09Z
Last change time
2024-10-03T07:50:33Z
Keywords
pull
Assigned to
No Owner
Creator
Andrei Horodniceanu
Comments
Comment #0 by a.horodniceanu — 2024-08-23T04:59:09Z
The current implementation of spawnProcessPosix is broken on systems with a large `ulimit -n` because it always OOMs making it impossible to spawn processes. Using the libc implementation, when available, for doing file descriptor operations en-mass solves this problem.
Comment #1 by dlang-bot — 2024-08-23T05:02:18Z
@the-horo updated dlang/phobos pull request #9048 "std/process: Default to libc closefrom in spawnProcessPosix" fixing this issue:
- Fix Bugzilla 24715 - std/process: Default to libc `closefrom` in spawnProcessPosix
The current implementation of spawnProcessPosix is broken on systems
with a large `ulimit -n` because it always OOMs making it impossible
to spawn processes. Using the libc implementation, when available, for
doing file descriptor operations en-mass solves this problem.
Signed-off-by: Andrei Horodniceanu <[email protected]>
https://github.com/dlang/phobos/pull/9048
Comment #2 by dlang-bot — 2024-10-03T07:50:33Z
dlang/phobos pull request #9048 "std/process: Default to libc closefrom in spawnProcessPosix" was merged into master:
- 48d581a1f509a7a302ea893e28939edb5b130622 by Andrei Horodniceanu:
Fix Bugzilla 24715 - std/process: Default to libc `closefrom` in spawnProcessPosix
The current implementation of spawnProcessPosix is broken on systems
with a large `ulimit -n` because it always OOMs making it impossible
to spawn processes. Using the libc implementation, when available, for
doing file descriptor operations en-mass partially solves this problem.
Signed-off-by: Andrei Horodniceanu <[email protected]>
https://github.com/dlang/phobos/pull/9048