bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stdlib: Relax definition of EXIT_FAILURE.


From: Bruno Haible
Subject: Re: stdlib: Relax definition of EXIT_FAILURE.
Date: Sun, 23 Jun 2024 03:55:30 +0200

Hi Collin,

> Can we relax this definition to allow for any POSIX 2024 compatible
> value? (1-125)

We should *not* do that.

Our unit tests not only serve to check POSIX or GNU behaviour of
constants, header files, and functions. They also serve to check
assumptions that are so widely used, that things would horribly
break if they were violated.

In this case, if EXIT_FAILURE were 2 or 3 instead of 1 on some
platforms, the *documented* exit codes of the 'diff' or 'grep'
commands or other utilities would not hold any more.

If we ever encounter a platform where EXIT_FAILURE was like this,
we want to know about it quickly, so as to avoid silly bug reports
when some GNU packages are compiled on that platform and don't work
as expected.

If someone wants to create a pure POSIX test suite from the Gnulib
tests, they are welcome to do so. I would also applaud efforts if
some people were to create an interesting POSIX test suite that
is Free Software, with Gnulib bits included. But that is likely
some bigger effort, that the Linux Foundation maybe could host.
(The Open Group will not be in favour of it; AFAIU, they want to
sell their proprietary POSIX test suite for expensive money.)

> I think it is
> best to keep the system definitions as long as they don't cause
> strange bugs like the Tandem/NSK case.

Sure. The point here is that any value != 1 would cause strange bugs
as well.

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]