Login
You're viewing the functional.cafe public feed.
  • Nov 13, 2026, 10:12 PM

    The bonus round for the 'status=0100' is that this is also the status returned by wait(2), which famously encodes multiple things and is decoded with (C) #define'd macros. So I had to read the program source code and then find and read appropriate /usr/include header files.

    I think this is 'normal exit() call with status 1' as opposed to, say, a signal, but don't quote me on that.

    💬 1🔄 0⭐ 0

Replies

  • Nov 14, 2026, 12:09 AM

    @cks That's what it was in Unix, but I wouldn't bet on Linux, and with the POSIX macros for abstraction it needn't be anyway.

    We need something like strerror but for wait status.

    💬 1🔄 0⭐ 0
  • Nov 14, 2026, 12:17 AM

    @oclsc That's what the Linux macros appear to claim (and it matches the other symptoms). But yeah that's non-portable and an assumption and etc, and it makes me wish for a little utility program that takes the raw number and applies the macros and etc to it to decode it for me.

    (That'd probably be trivial to write, but I feel like I shouldn't have to.)

    💬 1🔄 0⭐ 0
  • Nov 14, 2026, 5:06 PM

    @cks

    I actually thought that there would be something like that knocking around, from years ago. It would be the sort of tiny utility that I would have expected to have been posted to comp.unix.sources or suchlike.

    @oclsc
    #Unix

    💬 0🔄 0⭐ 0