delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/02/11/21:06:57

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D8063858022
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1613095572;
bh=2OQ3Y2tjvGFzjTog0mWZGVDcutnUC9pVN3IfCAnsVk0=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=b/sZCxZowrvyXEENQrRSFmMOqsYlml7ddcBjIbR+F21PXZMoVsMBuvRZLf3mBf5vi
RKflF/9xWoBwHiUXCNSxfctH/stKtl8i03T1qvhQmtJCq8aSv4iWYHPJuWJ6yavhwZ
Shto4jV/9p2cwc1fGvweHxesIWg0qQd+JFu3Mw2Y=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D33753858022
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=OxaVO59rNmxdVgj88VY/FzfYxGNQSI2MDW4LfEFwuuxdX0OfaqdqgUffIn/voA3asLfibS/cYruaAazP/OiDFNv0HNSOMljlxF0PUaYWgEx8gweRnoDK6GTPDNOMFVEybkb5jedYSY1gOvxk1clqqIMatx3wnoOicuj5Fe6IkwZxErwVKOx7Si+Z/r8EFcIxDJeSJkbqSXPHCBTBdHLpqhoStsSX421JqvSIS32TrUDbF0H6heo/iK4xUGvJAXFg8OQR/rn0f47V9HMIbceikmA02UTlz6j0waXTXYyofS91KJTS7ejLlnYxBD5dPnttZ8LSpSCxeT4YRN6eXHWfnw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=tJri685FVlAOeXrYilojmAkTyhZAGR9pBZdyiK7gj1k=;
b=etfAprecz76UIYcJ5522aKUtv/YiviQij08cZBiU3h1VFKTEAxsniZ6Fdjw8BMEtZD0qpzq/oS09CjENqeXsm1HRJHfj/mh+FMWDWXMOw0TrX9pJjDWU0OrsFM7Berk196Y4md2H6vPf+gPbjKriUFAt18W3/N3ynAYD2U4bD9TDktqid6XmT7cn0CCuDs9oHet5cFp2zCA6p+BNAoPhb3Bes8DvOSTK6sR973wBztwPumzy789LwqL5zbd36MsIpAwn+PWBQuUVEBDt+lglyu/T9J+iQkIT3/nhcGrRz36feK6VCG2ScFxJBPjyWlW9RK0oUyJKeXuPiVafZdj6DQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu;
dkim=pass header.d=cornell.edu; arc=none
Subject: Re: setrlimit always fails
To: cygwin AT cygwin DOT com
References: <b0924bcb-56d0-a026-84b5-71750537facb AT fexl DOT com>
Message-ID: <1c233bc7-401b-568f-36d5-48c4f1d4dcea@cornell.edu>
Date: Thu, 11 Feb 2021 21:06:03 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.7.1
In-Reply-To: <b0924bcb-56d0-a026-84b5-71750537facb@fexl.com>
X-Originating-IP: [65.112.130.200]
X-ClientProxiedBy: BN9PR03CA0560.namprd03.prod.outlook.com
(2603:10b6:408:138::25) To BN7PR04MB4388.namprd04.prod.outlook.com
(2603:10b6:406:f8::19)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 05956a87-f788-434c-a198-08d8cefac17d
X-MS-TrafficTypeDiagnostic: BN7PR04MB5345:
X-Microsoft-Antispam-PRVS: <BN7PR04MB5345BFDCF42946981DFD7A32D88B9 AT BN7PR04MB5345 DOT namprd04 DOT prod DOT outlook DOT com>
X-MS-Oob-TLC-OOBClassifiers: OLM:2733;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: qNQHVtqvv95HUZHHfEg8WkU4EchFWOmPExlFl5vSwPGcXv8NrAL6aw9AQxDVENG9MYImoLf3t8jCIfthf9/Cv9R8wZdEV051LDvl22HZdQkDaX03zaePlbYqpMAZ0nyvJcQ96YbDWOuAgmfcMT3hEk8RZqKLSq2DcuWfzWDcyYTty2LAVrU6UbEOGTEWAC/Hs9anpxMceYZXqFpeeQELDdBhrPzzkTz4/X5TkrpKB5+2+9/lIziSlcFUqb725aiXxiumA28cX3ZnDpWq9jXrs9+H0ec7CzS0G9ZfI5YxY8rFi/zyqpPspItNbLMCTli3oV1QdBEEDlPeKAM8OErUM4sBOkRENM45TSoFqHYdqS8Ru8lGxGJPAT7NvXrKr0JIcpjk0VTig9eUgskz/Jq+KiacKo3LDaqngBnwDo3nFb8svuGInt5Yh6CnB7SIfeVeRBoOJdSoFMRP51qdYPGWewpahctVSy5hYKs+PtBeiAym839aHumwDWK3YvZHkmwIMal9JcfTNqcSy6/kDEzBuhizEef5P3e8oixXqoCH4hMQVEzL+/hB9V9u8CiQDsTO9BYoVryvOqHuHmrsEyAalAYDQiikmtGBWHE0J64bc6nE4rN2JRqmkXwIyKE6koIhuhFl+AogldUfps1083ePYK2KrZJioky06wq2YE9xXok++9x2nP8/e5aQu4GBPLie
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE;
SFS:(4636009)(346002)(39860400002)(136003)(366004)(376002)(396003)(6486002)(966005)(478600001)(83380400001)(26005)(2616005)(75432002)(7116003)(2906002)(956004)(186003)(31696002)(4744005)(16526019)(86362001)(786003)(31686004)(66476007)(66946007)(3480700007)(5660300002)(8676002)(8936002)(6916009)(36756003)(66556008)(53546011)(16576012)(316002)(52116002)(45980500001)(43740500002);
DIR:OUT; SFP:1102;
X-MS-Exchange-AntiSpam-MessageData: =?Windows-1252?Q?eruSzqpZvA7ODz49xwPzN+uvOJxSwN+Pyg5fxHEcdlooNG5OrIurH+y4?=
=?Windows-1252?Q?SKbsZYcnwL72iA0KI+D8PuGKA4L1KyPDrbw/VDNNReMYgXFYPqGit7yU?=
=?Windows-1252?Q?njI1yX+Ys9x2mFDXWmRamvYAMhGWUGKn3edq2kJM94gvME1b7pxUG39N?=
=?Windows-1252?Q?kIhIKOvAMs7TqlC0KBgbmNJCG95reXGGHYcmsDSIZObWZcPxbojWj5Wp?=
=?Windows-1252?Q?rWUVNZB+x/dUURSador9WDnPbMojoVL5hB9mYeSaj1UtckSNl8CTxfN2?=
=?Windows-1252?Q?mWmdu12TC9LCIoOhQBeYf75+UWb4sbER2ECIk506/zY9xfnmhOXVgxkV?=
=?Windows-1252?Q?abDKHATHhikbAQUcqpdLy9dQNgUzN4WkRCz4mHrFzW/+6j1Db6GanCph?=
=?Windows-1252?Q?3BA5UqPOQpz2/N5l1QJ5ekLvcH6OM2KODxYxsJNTk2f85HTqeV8lS7iF?=
=?Windows-1252?Q?hww3sDTmVLFaa5Ys3GUeIdp6nl4B7iBR+diwkUJCHUEWbtP4RaKqjvF4?=
=?Windows-1252?Q?ByES0qU1N2jv64B0BLOjGybPubRwJALo9RCQrHcpSEYdREaDIHKoDIXY?=
=?Windows-1252?Q?IvxDUpTyr6rTs6RrUTaBH3+ORCp/a3JQsbQp3v3n4Elhj6T8oskQjgsv?=
=?Windows-1252?Q?vAQIhN+aD/CBCc9QSOWFJ/ewTxJwZgfS/vSNf1w/6t2hiyCwUGgXX/yp?=
=?Windows-1252?Q?Hk+lE2D31n40yC3TuhEcqrLgk49IGpYuD9djUU98VKjyhJ8H6bOOcPZv?=
=?Windows-1252?Q?e+BeuGFPg1q2b4W0iBZ6xiZETMlvsfjhW31QEIxlKMbXrob/4ZfFe9Tw?=
=?Windows-1252?Q?QUuvubIzTz9vKsckRhtN/mUJRiRJZ4r6pdmYIMpwK8hEjz+ch+HLGiWV?=
=?Windows-1252?Q?6s4jmGr9SwEWomlnmqIBseIGkcqOnSb6bGSOWoO3+83NmQdaX3yNt9es?=
=?Windows-1252?Q?8T4tKVZ6rScwqXGDvwr+YrJyiwqdJdJbJ/DdoIQdryQ9LoCl3T+VjYOQ?=
=?Windows-1252?Q?UB1qcIKUC8hAtPT8t/AuKM/yMPBZQ1LeYfiN8UH3UL8iwR25drmmomi4?=
=?Windows-1252?Q?iWqx9gbSkdDrsye+A+/TNngQ2ObQbsbPtUOvo1VYJXVjrnSJPtqapfF4?=
=?Windows-1252?Q?gdF8hFJKPG8BRdzp94ymmHY3qZi+6QpSQbzc6tcq1zc2rQ+blqOcyfaj?=
=?Windows-1252?Q?IHi6AlF6bWP919R3AtIAcOErQBlBsXY+WpC4UQPuWk9Pg25jco8SF/ry?=
=?Windows-1252?Q?3vG3egHHwc5mlSt9NPArHdcnOrkkrgFu+4nRlMf+XUO3JThRn/ctHJiU?=
=?Windows-1252?Q?ZUrJ6fgVeW8G9/2dVVRAZONB557Dm3NG18PzPqtCOdDWyDztYSs/Tnbe?=
=?Windows-1252?Q?93h/+ci+P7gJw3TThGg6qEgROTz78tsnralJJpy8SApQTjVz0Zjy97g8?=
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: 05956a87-f788-434c-a198-08d8cefac17d
X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2021 02:06:05.8935 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 5AZ4R/8hLvn5BRlJEEsSGG79SzoA1kIT4YWXaEQBfm2dSGHCp/rKx1PFIDIFbY83FPRfLlCz6TI9XKKv9VumOQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR04MB5345
X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, MSGID_FROM_MTA_HEADER, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS,
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
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Ken Brown via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ken Brown <kbrown AT cornell DOT edu>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019