NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/59058: env(1) exit status can be incorrect
The following reply was made to PR bin/59058; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/59058: env(1) exit status can be incorrect
Date: Sun, 09 Feb 2025 19:14:25 +0700
Date: Sun, 9 Feb 2025 04:10:00 +0000 (UTC)
From: kre%munnari.OZ.AU@localhost
Message-ID: <20250209041000.A6E151A923D%mollari.NetBSD.org@localhost>
| On the other hand using '1' as the exit code for invalid options is
| an exceedingly poor choice (unfortunately, it might be mandated by
| POSIX, I'll check later).
It isn't, POSIX allows anything between 1 and 125 (including those)
as the exit status when env detects a problem and the utility named
(if there is one) is not invoked.
So:
| If not mandated, it would better to make that one exit(125)
that is what I am planning to do - including adding a couple more
error cases (such as write errors to stdout when env is operating
in its printenv mode) that weren't previously detetected.
kre
Home |
Main Index |
Thread Index |
Old Index