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

setrlimit not available on os x #480

Closed
giampaolo opened this issue May 23, 2014 · 1 comment
Closed

setrlimit not available on os x #480

giampaolo opened this issue May 23, 2014 · 1 comment

Comments

@giampaolo
Copy link
Owner

From l...@hupfeldtit.dk on February 16, 2014 18:13:15

psutil.setrlimit is not available on os x, but resource.setrlimit is.
I'm guessing psutil proxies the similar methods on resource?

Original issue: http://code.google.com/p/psutil/issues/detail?id=480

@giampaolo
Copy link
Owner Author

From g.rodola on February 16, 2014 09:41:25

stdlib resource.getrlimit() and resource.setrlimit() are implemented by using 
getrlimit() and setrlimit() POSIX syscalls which let you set/get resource 
limits *for the current process only*: http://linux.die.net/man/2/getrlimit 
psutil implementation uses prlimit() syscall, which lets you set resource 
limits for *any process PID* (not only os.getpid()).
prlimit() syscall is Linux-specific, so that is why psutil exposes it on Linux 
only as psutil.Process.rlimit().

Thanks for the suggestion though, it was very clever.
Please keep suggesting similar things! =)

Status: Invalid

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

No branches or pull requests

1 participant