Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getrlimit(2) #878

Closed
kpcyrd opened this issue Mar 31, 2018 · 4 comments
Closed

Add getrlimit(2) #878

kpcyrd opened this issue Mar 31, 2018 · 4 comments

Comments

@kpcyrd
Copy link
Contributor

kpcyrd commented Mar 31, 2018

I'm currently looking for a way to increase the maximum number of open file descriptors, it seems there's no crate yet besides the raw syscall in libc.

There was #364 which didn't get merged though due to some other setrlimit related problems.

@asomers
Copy link
Member

asomers commented Mar 31, 2018

If you're interested, feel free to pick up the PR and finish it. Also, is this issue titled correctly? "uname -n" has nothing to do with file descriptors.

@kpcyrd kpcyrd changed the title uname -n ulimit -n Mar 31, 2018
@kpcyrd
Copy link
Contributor Author

kpcyrd commented Mar 31, 2018

@asomers you're correct, I keep confusing those two, thanks.

Do I need to implement all of setrlimit to get the PR merged? It seems there have been some problems with other resources unrelated to fds.

My first guess for the api would be:

getrlimit(Resource) -> Result<(Option<usize>, Option<usize>)>
setrlimit(Resource, (Option<usize>, Option<usize>)) -> Result<()>

@Susurrus Susurrus changed the title ulimit -n Add getrlimit(2) Nov 25, 2018
@LMJW
Copy link
Contributor

LMJW commented Oct 9, 2020

Working on this issue, see PR #1302

@rtzoeller
Copy link
Collaborator

#1302 addressed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants