From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 17135 invoked from network); 24 Mar 2020 02:08:59 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 24 Mar 2020 02:08:59 -0000 Received: (qmail 28288 invoked by alias); 24 Mar 2020 02:08:53 -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: 45610 Received: (qmail 8795 invoked by uid 1010); 24 Mar 2020 02:08:53 -0000 X-Qmail-Scanner-Diagnostics: from wout4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(64.147.123.20):SA:0(-2.6/5.0):. Processed in 4.055357 secs); 24 Mar 2020 02:08:53 -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: gggruggvucftvghtrhhoucdtuddrgedugedrudegledggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqh dttdertdejnecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggrnhhi vghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrddukedurdeluddrhedtnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgv X-ME-Proxy: Date: Tue, 24 Mar 2020 02:08:07 +0000 From: Daniel Shahaf To: Jun T Cc: zsh-workers@zsh.org Subject: Re: [PATCH] find RLIM_NLIMITS correctly on Cygwin Message-ID: <20200324020807.7d35b332@tarpaulin.shahaf.local2> In-Reply-To: <944ABBFD-ED15-4638-9C23-E9E36BA80A30@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> <374cecf6-45d5-4688-861f-cc52017dbcea@www.fastmail.com> <321F9465-ABF9-465D-9242-7EF9A0EDDBED@kba.biglobe.ne.jp> <20200320191846.3a4f5682@tarpaulin.shahaf.local2> <944ABBFD-ED15-4638-9C23-E9E36BA80A30@kba.biglobe.ne.jp> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Jun T wrote on Mon, 23 Mar 2020 14:31 +0900: > reply 1/2 to workers/45590=E2=81=A9 > > 2020/03/21 4:18, Daniel Shahaf wrote: > >=20 > > Continuing my review: > >=20 > > Jun T wrote on Tue, 25 Feb 2020 18:38 +0900: =20 > >>=20 > >> -END { > >> - if (limrev["MEMLOCK"] !=3D "") { > >> - irss =3D limrev["RSS"] > >> - msg[irss] =3D "Mmemoryuse" =20 > >> - } =20 > >=20 > > Question. I compared the output before and after the patch and I see > > the following difference: > >=20 > > % diff -U0 =3D(zsh-5.7.1 -fc 'limit') =3D(limit) > > --- /tmp/zshZXxkUD 2020-03-20 18:00:04.239999929 +0000 > > +++ /tmp/zshxTTscg 2020-03-20 18:00:04.239999929 +0000 > > @@ -6 +6 @@ > > -memoryuse unlimited > > +resident unlimited > > zsh: exit 1 diff -U0 =3D(zsh-5.7.1 -fc 'limit') =3D(limit) > >=20 > > It seems to be caused by the C implementation not having an equivalent > > of the above piece of code. this difference intentional? =20 >=20 > Sorry, I just lazily ignored that part of rlimits.awk because: > I didn't understand why existence of RLIMIT_MEMLOCK affects the name > of RLIMIT_RSS, and, > on Linux ulimit prints it as "resident set size", and, > RLIMIT_RSS is used only in kernel 2.4.29 or earlier (on Linux). >=20 > # bash's builtin ulimit prints it as "max memory size" on Linux. >=20 > If compatibility with the previous version of zsh is important > we may use the patch below. I don't know what the rationale/purpose of that awk snippet was, so I'll leave this to your judgement. (The awk check has been there since before the first git revision.) > zshbuiltin man page also needs be updated. Do we need to list all the > known resources? Or just list most common resources and mention that, > for example, exact list of resources supported on your system can > be shown by running 'limit' or 'ulimit -a'? I'd vote for the latter. Cheers, Daniel > +++ b/Src/Builtins/rlimits.c > @@ -65,18 +65,23 @@ static const resinfo_T known_resources[] =3D {