This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: raise maximum file descriptor limit
Do a binary search for the maximum RLIMIT_NOFILE. Works around the low, low limits on certain high, high-priced devices from Cupertino, CA.
- Loading branch information
1 parent
f311963
commit 6820054
Showing
1 changed file
with
23 additions
and
0 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
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be in libuv?
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit too special-purpose for that IMO.
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 for doing it in libuv, its too hacky for general users.
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about doing it in a separate dep, as a single function?
increasenofilerlimit
or something? That way people using libuv could also choose to use it, without needing to have to have it within libuv?6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 20 lines of code? Seems like overkill. If people want to use it, they have my permission to copy it. Not that they need permission, it being covered under the MIT license.
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bnoordhuis I guess the same principles we apply to node modules we don't apply to C code then. :)
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libuv? OMG seriously?
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ruins expectations of ulimit -S not being automagically overridden when you run commands.
6820054
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we commandline flag this perhaps? It does seem to violate rules about least-surprise.