Date: Sun, 1 Mar 2026 11:43:47 -0800 From: "Enji Cooper (yaneurabeya)" <yaneurabeya@gmail.com> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org> Cc: Warner Losh <imp@bsdimp.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: <3464A20F-B0F2-456E-8826-A43006457CC4@gmail.com> In-Reply-To: <86ldgbny7e.fsf@ltc.des.dev> 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> <86ldgbny7e.fsf@ltc.des.dev>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] > On Mar 1, 2026, at 11:31 AM, Dag-Erling Smørgrav <des@FreeBSD.org> wrote: > > 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. 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. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmklvMACgkQGpE5DjPs NJhhCg//e4C2UgFIdhWkTnJn+ckn8bZCzVq4RMmkKZR2IUc7HuzTyYlG0VmLrTaT 7VXG6BNra8nBgmwqdClvMrFcRZ2Zy+OpW/pMHgnqXzuRlWasyQbrPHjRKkV0Y6V7 I6JYOe7XumngSFyuujCzC604KhGTAjM1nKXewfXnw55xouHzi7NG0yigjYi4bDBm dleb2d7n5Xz5lwXrDewqYuKj501eNNj5JA+54Sc46+FDSH/geurjh5J1ihTr63vJ v8fhMGVzsjYjDwxRyKJmZs55ytQopwQV2LEDGxJygOOabiNweWJnYl852yy/jf0n QXxuhOu3RdCEU5FN00NuYecvsGneMZBsxB563rcR/rbRQGMR7/JPD3qTu7Bk47bQ TQSbWS5sm07BNXXLfqGhiXhJ4yTYiM4Sl2zSZYkJJyDw8yFSiosOADfhpRgZVqfV XbmASgJUQwMCuZiH5yEwPWnvIjSt0nMMGVyJrA3od+KNG0RA7R+uTUTt2ZuP1Blo tC8oOQX28OPe2ZMkJH/MOvV+0fB7GOuLq4qNWpWhTQTCEKqKJgd+e4jXAIvkXoNK meBypKr4e3aUkRX6d6mCxPYg9wTnjF50W1+MCj8lme/lKHBPGhUi0bvatAYn4R/q 3oPPPGeei6s/glxgaxyXXKy2sV4C/zKGtFhqQ3yscgftYf9E3Zo= =4KCo -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3464A20F-B0F2-456E-8826-A43006457CC4>
