Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] POSIX compliant nice error checking
- X-seq: zsh-workers 44842
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] POSIX compliant nice error checking
- Date: Wed, 16 Oct 2019 16:43:03 +0000
- Accept-language: en-GB, en-US
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20191016164306euoutp024bc233d747e509c5464993fe101a454d~OLkM5aeuX0631606316euoutp02G
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1571244186; bh=Fa+o84m/1qmkjIJOyoS04HghJ1QuGy1Lgw7ad0eAUMk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lUBjASn8GV2lJRtbz6y9vJWzJKxNhZKfGaNyW+h96VrAxJkcDwrPgiJddcYSwWpFx aqE3eP7Ubg53qaLADmJKQFckvOF1q0EvXcGXuJiPzz1swuDT46OQ2x/OLvdHMcOZzj me3Q3SEEKop5+6h+rflGqhkT3tsafKNxn5R6zwUg=
- In-reply-to: <5360011571243166@vla1-d97dbca235a9.qloud-c.yandex.net>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20191016162708epcas2p37dc37493509eba8460bca124ffc3c32b@epcas2p3.samsung.com> <5360011571243166@vla1-d97dbca235a9.qloud-c.yandex.net>
- Thread-index: AQHVhD62vMEDf02Djk+jbvUJTWDctKddaE2A
- Thread-topic: [PATCH] POSIX compliant nice error checking
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author