X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E6AD39CD516 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1613121162; bh=FhrB/ytpZuUe8OHPUZoyT12NJqVPGFiDCSgiAkA5StQ=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=didh/gvVHTsqGSLHRz3DYu2fTpTJ7Y66DsqrJqwZvj6YGR2YAL7OCMzfT7QaO1xHO 0hAOCHZBS1kOgxvr6J44aKz9Lq4KV1B0KmGU3zlUcVH4QEZX6PIrByiMCiWknnuQ0j 6EtwqOdlUzBKiyVxxokMND+MTDiErTYzPKC56J0k= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7B50039CD51C Date: Fri, 12 Feb 2021 10:12:33 +0100 To: cygwin AT cygwin DOT com Subject: Re: setrlimit always fails Message-ID: <20210212091233.GG4251@calimero.vinschen.de> Mail-Followup-To: cygwin AT cygwin DOT com References: <1c233bc7-401b-568f-36d5-48c4f1d4dcea AT cornell DOT edu> <42b30732-9aee-454e-3359-92a82ef09f0d AT SystematicSw DOT ab DOT ca> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <42b30732-9aee-454e-3359-92a82ef09f0d@SystematicSw.ab.ca> X-Provags-ID: V03:K1:Vyp6seFSYyH3BEI4oJ7kYCv2E6ZAEbItpjWL14rumJkS32bg3fg t7HtiY/lkecBpoFzlvS5oawCCUo+Qsy1ogtklz+CdidQ++PzkwHVSdoyW03BwPtLNDXnF11 WWWNRl8D1QPzcnFWMr6HQb7kfJaUJ0sP37P2Lt0v9r6jc9y5eUUj8lRXSYvaqrv+fJzpTPJ yiSixxVP8V1q/DMXd0P3A== X-UI-Out-Filterresults: notjunk:1;V03:K0:cOaockQe4S4=:SVJt9GpBtsRGM0YFTO/mEf BGMllispI/qLaEvIRnoKkIkReTyy7vhsjMra3yzWPZKn1w5wXNilEA/L7bibEOIvKJgiofJc0 cE2HQoL4vvbFKmf0jyr6mPgCDc64QB1DPzm2vMUqrbr+ev0zSqFEMVfeR9glIqjZ4DhUCUcjP 8TVrd64vNbo1LN3XBOSUK1iGDdGTKaQX0u1wgrbRKRwFnNPQgipsOs9a1Svvvpl8MsnogQc5e OoFvmThAmmPECUKw+BqbpPCdRXI5paTUaXFNiHPij34s6UzlVu12Iur6zv2zY0xMgulDs9FK0 7c9PVTqyf1zkQ2FpWRoCCxISPpIov3An+uGNJynqnCmuWThgCIQnPipJWy6DEZYOVGGWwFyXu c/egKTuMJw6mOWFQ36zpTUfFisOmjcJcPwOQ++7dhmmkaj1btV55CwNznj7iBk/abnlU5FrKE 90hltgJMN4RYxLUzkguk4g/4mcOr8v/TwdZZzrQoW8UOcSfYXChsM8ZbI4iSbxQchNQWbeSDY g== X-Spam-Status: No, score=-99.8 required=5.0 tests=BAYES_00, BODY_8BITS, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 11C9D7Hd024239 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 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 > > In that case could I suggest: > > /usr/share/doc/cygwin-doc/html/cygwin-api/compatibility.html#std-susv4 > https://cygwin.com/cygwin-api/compatibility.html#std-susv4 > > in https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/doc/posix.xml > > get/setrlimit entries should be annotated with: https://cygwin.com/acronyms/#PGA Corinna -- Corinna Vinschen Cygwin Maintainer -- 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