From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id af82cd56 for ; Tue, 14 Jan 2020 16:26:13 +0000 (UTC) Received: (qmail 1019 invoked by alias); 14 Jan 2020 16:26:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45301 Received: (qmail 3816 invoked by uid 1010); 14 Jan 2020 16:26:08 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25691. spamassassin: 3.4.2. Clear:RC:0(66.111.4.27):SA:0(-2.6/5.0):. Processed in 4.477128 secs); 14 Jan 2020 16:26:08 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrtddtgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgsehtqh ertderreejnecuhfhrohhmpedfffgrnhhivghlucfuhhgrhhgrfhdfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfrrghrrghmpehmrghilhhfrhhomhepug drshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvnecuvehluhhsthgvrhfuihiivgep td X-ME-Proxy: X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-754-g09d1619-fmstable-20200113v1 Mime-Version: 1.0 Message-Id: <374cecf6-45d5-4688-861f-cc52017dbcea@www.fastmail.com> In-Reply-To: <3340070A-53DD-40F0-8363-A8C7D84702D3@kba.biglobe.ne.jp> References: <82F8CDE0-C95C-4D31-ABFC-EBB3C97799F3@kba.biglobe.ne.jp> <1B509B1C-A670-482F-9D88-2145E15D03A1@kba.biglobe.ne.jp> <20200109131553.hqetnd45sc43z6xb@tarpaulin.shahaf.local2> <087AE8B9-35B0-4258-9626-AACA85471A07@kba.biglobe.ne.jp> <20200111201549.GA1264@tarpaulin.shahaf.local2> <3340070A-53DD-40F0-8363-A8C7D84702D3@kba.biglobe.ne.jp> Date: Tue, 14 Jan 2020 16:25:02 +0000 From: "Daniel Shahaf" To: zsh-workers@zsh.org Subject: Re: [PATCH] find RLIM_NLIMITS correctly on Cygwin Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Jun T wrote on Tue, 14 Jan 2020 04:44 +00:00: >=20 > > 2020/01/14 1:42, Daniel Shahaf wrote: > >=20 > > Jun T wrote on Mon, 13 Jan 2020 11:00 +00:00: > >>=20 > >>> 2020/01/12 5:15, Daniel Shahaf wrote: > >>>=20 > >>> The part that's not clear to me is how we'd even know that =C2=AB8= =C2=BB is a valid value for > >>> the first actual argument to getrlimit(). Currently, the code ass= umes that the > >>> values of RLIMIT_* macros are consecutive small integers, but that= is not guaranteed > >>> by any standard, is it? > >>=20 > >> There is no guarantee, but current version of ulimit builtin accept= s any number > >> for -N (and output error). limit builtin accepts only the resource = name, > >> and maybe we accept "unknonw8" only for getrlimit() but not for set= rlimit()? > >=20 > > Sorry, I don't follow. Why shouldn't we accept "unknown8" in the li= mit-setting syntaxes? >=20 > Sorry for my unclear English. >=20 > Why do you think that knowing "8" is a valid resource number is import= ant? I don't think that. I was asking a rhetorical question, the implication= being that we _should_ allow setting limits by number even when that number was not determined to be known-good at build time. > I think we can just call {get, set}rlimit() with any resource number, > but if you think it better to avoid using questionable resource > number, then we can avoid calling setrlimit() that may actually change= > the limit of "unknown" resource. But ulimit -N 8 can change the limit > anyway, so I think we can call {get, set}rlimit() with any resource > number specified by the user. +1, agreed. Cheers, Daniel