> > I thought that the maximum portable exit status in POSIX was 127 (or 255, > if you allow process termination by signal).
An exit code stores the signal it received in its upper nybble, and the program's actual exit code in the lower nybble. Or at least that's how I read it was *supposed* to work. Trying to set an exit code greater than 0xFF will just return the value modulo 256, which makes the exit status of 4096 so interesting: λ tmp: bash -c 'exit 4093'; echo $? 253λ tmp: bash -c 'exit 4094'; echo $? 254λ tmp: bash -c 'exit 4095'; echo $? 255λ tmp: bash -c 'exit 4096'; echo $? 0λ tmp: bash -c 'exit 4097'; echo $? 1λ tmp: bash -c 'exit 4098'; echo $? 2 4096 % 256 is 0, so… does that mean the original exit status meant to report *no* error? Also, I googled what "nixpkgs" was and found… something <https://github.com/nixos/nixpkgs> resembling resembling a Linux distro(?!) but also a package manager that can be installed on different systems. Oh, and Nix is a programming language as well. I've never been this confused over what the hell to even call this thing. Reading its glossary <https://nix.dev/reference/glossary> didn't help alleviate my confusion, either. — Alhadis On Thu, 15 Oct 2026 at 05:40, G. Branden Robinson < [email protected]> wrote: > Hi Bruno, > > At 2026-10-14T20:12:37+0200, Bruno Haible wrote: > > On Alpine Linux 3.24, FreeBSD 15.0, OpenBSD 7.9, I see a test failure: > > > > FAIL: contrib/mm/tests/GETST-works.sh > > > > Find attached the log files. > > Thanks. I'm pretty confident this is > <https://savannah.gnu.org/bugs/?68775>. > > > It is strange that the error is: > > mmroff: fatal error: "./groff -rRef=1 -z -mm -t -T utf8 -P -cbou > ../contrib/mm/tests/artifacts/use-reference.mm" exited with status 4096 > > I thought that the maximum portable exit status in POSIX was 127 > > (or 255, if you allow process termination by signal). > > It's the return value of Perl's `close()`. It'd probably be a good idea > to clarify this diagnostic message. > > Regards, > Branden >
