> On Mar 1, 2026, at 11:31 AM, Dag-Erling Smørgrav <[email protected]> wrote: > > Warner Losh <[email protected]> writes: >> Dag-Erling Smørgrav <[email protected]> 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.
You’re right: please ignore this part of my earlier reply because it’s not relevant to what you did in this change. Thanks, -Enji PS Please don’t change the diff3 code to sysexits(3). Like you and Warner pointed out it doesn’t make sense to apply them to this utility.
signature.asc
Description: Message signed with OpenPGP
