Re: setrlimit always fails

2021-02-16 Thread Brian Inglis
On 2021-02-16 08:22, Marco Atzeri via Cygwin wrote: On 16.02.2021 15:53, Patrick Chkoreff wrote: Corinna Vinschen wrote on 2/15/21 3:48 PM: On Feb 15 14:54, Patrick Chkoreff wrote: Corinna Vinschen wrote on 2/15/21 4:14 AM: To fix that, I must define _USE_XOPEN You really, really must not u

Re: setrlimit always fails

2021-02-16 Thread Marco Atzeri via Cygwin
On 16.02.2021 15:53, Patrick Chkoreff wrote: Corinna Vinschen wrote on 2/15/21 3:48 PM: On Feb 15 14:54, Patrick Chkoreff wrote: Corinna Vinschen wrote on 2/15/21 4:14 AM: To fix that, I must define _USE_XOPEN You really, really must not use this macro. I'm glad to hear something definitiv

Re: setrlimit always fails

2021-02-16 Thread Patrick Chkoreff
Corinna Vinschen wrote on 2/15/21 3:48 PM: > On Feb 15 14:54, Patrick Chkoreff wrote: >> Corinna Vinschen wrote on 2/15/21 4:14 AM: >> To fix that, I must define _USE_XOPEN > > You really, really must not use this macro. I'm glad to hear something definitive about that. I don't even remember ho

Re: setrlimit always fails

2021-02-15 Thread Corinna Vinschen via Cygwin
On Feb 15 14:54, Patrick Chkoreff wrote: > Corinna Vinschen wrote on 2/15/21 4:14 AM: > > > That looks wrong. The __USE_ flags are internal flags from > > GLibc and not supposed to be used by application code. Check the Linux > > man page for strptime, the usage of _XOPEN_SOURCE or another flag

Re: setrlimit always fails

2021-02-15 Thread Patrick Chkoreff
Corinna Vinschen wrote on 2/15/21 4:14 AM: > That looks wrong. The __USE_ flags are internal flags from > GLibc and not supposed to be used by application code. Check the Linux > man page for strptime, the usage of _XOPEN_SOURCE or another flag > including _XOPEN_SOURCE (e. g. _GNU_SOURCE) is re

Re: setrlimit always fails

2021-02-15 Thread Corinna Vinschen via Cygwin
On Feb 12 10:11, Patrick Chkoreff wrote: > Ken Brown via Cygwin wrote on 2/11/21 9:06 PM: > > > 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=9e9d223466b7635b990d6c9e

Re: setrlimit always fails

2021-02-12 Thread Brian Inglis
rious 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 sour

Re: setrlimit always fails

2021-02-12 Thread Brian Inglis
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/

Re: setrlimit always fails

2021-02-12 Thread Patrick Chkoreff
Ken Brown via Cygwin wrote on 2/11/21 9:06 PM: > 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=9e9d223466b7635b990d6c9e0bfb9e2e9a46;hb=HEAD#l201 Thank you to all who repli

Re: setrlimit always fails

2021-02-12 Thread Corinna Vinschen via Cygwin
On Feb 12 00:26, Brian Inglis wrote: > On 2021-02-11 19:06, Ken Brown via Cygwin wrote: > > 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

Re: setrlimit always fails

2021-02-12 Thread Corinna Vinschen via Cygwin
On Feb 11 10:23, 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: > > #include > #include &g

Re: setrlimit always fails

2021-02-11 Thread Brian Inglis
On 2021-02-11 19:06, Ken Brown via Cygwin wrote: 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 exam

Re: setrlimit always fails

2021-02-11 Thread Ken Brown via Cygwin
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,

setrlimit always fails

2021-02-11 Thread Patrick Chkoreff
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: #include #include #include int main(void) { struct rlimit rlim; rlim.rl