On 2/11/2021 10:23 AM, Patrick Chkoreff wrote:
I'm trying to use setrlimit to impose limits on various resources such as CPU time and memory. The call to setrlimit always fails. I've distilled this into the following example test.c:
[...]
if (setrlimit(RLIMIT_CPU,&rlim) < 0)
[...]
setrlimit: Invalid argument
Cygwin's setrlimit only supports a few resources, as you can see in the source: https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/resource.cc;h=97777e9d223466b7635b990d6c9e0bfb9e2e9a46;hb=HEAD#l201 Ken -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple