Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Mar 2026 20:31:33 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Enji Cooper <yaneurabeya@gmail.com>,  src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: c2dee7786bf3 - main - diff3: Code cleanup
Message-ID:  <86ldgbny7e.fsf@ltc.des.dev>
In-Reply-To: <CANCZdfpCPDRVw0hU3nn__ed1KJu1__0r6_fUA2acm68AEvsuUA@mail.gmail.com> (Warner Losh's message of "Sun, 1 Mar 2026 12:22:25 -0700")
References:  <86tsuzojnj.fsf@ltc.des.dev> <5AF72509-9232-4B17-853D-A12D9862C422@gmail.com> <86pl5nnzbx.fsf@ltc.des.dev> <CANCZdfpCPDRVw0hU3nn__ed1KJu1__0r6_fUA2acm68AEvsuUA@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

Warner Losh <imp@bsdimp.com> writes:
> Dag-Erling Smørgrav <des@freebsd.org> writes:
> > EXIT_SUCCESS and EXIT_FAILURE are not sysexits, they are ISO C aliases
> > for 0 and 1.  They were only used in three places, while the rest of the
> > code used 0, 1, or 2.  I'm not opposed to switching to sysexits, but I
> > don't really see any benefit.
> Nor I.  Aren't the current valutes mandated by POSIX or by what POSIX
> mandates diff return though?  Switching to sysexits would make that
> harder since they don't align well with POSIX requirements.

This is diff3, not diff, and is not covered by POSIX.  If we want to be
fully compatible with GNU diff3, we should change all our error exits to
2 (they are currently a mix of 1 and 2), and exit 1 if and only if we
successfully found differences between the files.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ldgbny7e.fsf>