From: Peter Stephenson <p.stephenson@samsung.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: [PATCH] POSIX compliant nice error checking
Date: Wed, 16 Oct 2019 16:43:03 +0000 [thread overview]
Message-ID: <1571244183.5024.19.camel@samsung.com> (raw)
In-Reply-To: <5360011571243166@vla1-d97dbca235a9.qloud-c.yandex.net>
On Wed, 2019-10-16 at 19:26 +0300, _RuRo_ (Андрей Стоцкий) wrote:
> In `Src/exec.c`, the return value of nice(5) is checked, however
> according to POSIX (http://man7.org/linux/man-pages/man2/nice.2.html),
> one should check errno instead, since nice can return negative values
> even on success. Since nice(5) increments the niceness by 5, the
> return value can be negative, if the original niceness was less than
> -5. For example, with nice -6, you'll get the annoying `zsh: nice(5)
> failed: success` error message:
Thanks, I've committed that --- I suppose there's a vague possibility of
a problem with older systems that might not have set errno but that
doesn't seem worth worrying about.
pws
prev parent reply other threads:[~2019-10-16 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20191016162708epcas2p37dc37493509eba8460bca124ffc3c32b@epcas2p3.samsung.com>
2019-10-16 16:26 ` _RuRo_ (Андрей Стоцкий)
2019-10-16 16:43 ` Peter Stephenson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1571244183.5024.19.camel@samsung.com \
--to=p.stephenson@samsung.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).