-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use closefrom() to close open file descriptors
Replace the naive close() loop in js_os_exec with closefrom(). On my system RLIMIT_NOFILE is set to 1 million and the delay from the loop gets noticeable when I spawn many processes. Use dlsym() to look up closefrom() because it's not available everywhere (looking at you, musl.) Fixes: #711
- Loading branch information
1 parent
769e78f
commit c74923b
Showing
1 changed file
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters