[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: exit status patch for coreutils
From: |
Bernard Giroud |
Subject: |
Re: exit status patch for coreutils |
Date: |
Thu, 22 Jan 2004 15:05:49 +0100 |
Bernard Giroud
Credit Lyonnais (Suisse) SA
----- Original Message -----
From: "Paul Eggert" <address@hidden>
To: <address@hidden>
Sent: Wednesday, January 21, 2004 10:25 PM
Subject: exit status patch for coreutils
> (...snip...)
>
> I also noticed that EXIT_FAILURE might not equal 1, as POSIX does not
> require it. I recall that it's not 1 on traditional VMS, though I
> don't know if anyone uses coreutils on VMS or OpenVMS or whatever it's
> called these days.
Currently, GNV is based upon textutils-2.1, fileutils-1.10 and
shell-utils-2.1-1.
But I hope one day we will be able to port and use current coreutils.
That said, I posted some time ago a patch on GNV to be able to conditionally
return either a POSIX exit status if running under a shell, or a VMS status
if not.
Alas, this was not general, as I also needed to weaken a "not found error"
into
a "not found warning" for grep (it is a real shame POSIX doesn't
differentiate
between error and warning at a minimum!!).
Does POSIX specify all exit codes that might be returned from utilities ?
Have you a pointer to the POSIX docs ? Might it be possible to use a
scheme like values greater than 63 are warnings else errors...?
> The patch below also addresses this issue, by
> adjusting the documentation slightly and introducing a new symbol
> EXIT_FAIL for when programs want to return 1 even if EXIT_FAILURE
> isn't 1.
>
> Here's the patch.
>
> (...snip...)
********************************************************************************
This e-mail contains confidential information or information belonging
to the Credit Lyonnais Group entity sending it and is intended solely
for the addressees. Any views expressed in this message are those of
the individual sender and its contents do not constitute a commitment
by Credit Lyonnais unless confirmed by letter or fax. The unauthorised
disclosure, use, dissemination or copying (either whole or partial) of
this e-mail, or any information it contains, is prohibited. E-mails are
susceptible to alteration and their integrity cannot be guaranteed.
Internet communications are not secured and therefore Credit Lyonnais
shall not be liable for this e-mail if modified or falsified. If you
are not the intended recipient of this e-mail, please delete it
immediately from your system and notify the sender of the wrong
delivery and the mail deletion.
********************************************************************************