Search code examples
linuxprocessexitexitstatus

Exit status code 4479


Does anybody happen to know what exit status code 4479 (0x117f) means on an Ubuntu Linux system? I am getting this without my program encoding it (I only have EXIT_SUCCESS and EXIT_FAILURE, which are 0 and 1, respectively), and I cannot seem to find a list of such codes above 255. Thank you!


Solution

  • This 4479 or 0x117f looks like something you would see returned from a C/C++ system() call (as opposed to the value of the Unix $? predefined variable, which may be only 0-255). And given that you're on Linux, you are very likely using glibc.

    So in that case this value is not a 0-255 exit() status, but instead it is formatted like the status set by waitpid() (which could contain an exit status, but probably didn't in this case).

    If so, then the source tells me that WIFSTOPPED(4479) would return true, and that WSTOPSIG(4479) would return 17. (See the waitpid() man page for more information.) So the process for which 4479 is returned has not exited and is still there, but it was stopped by signal 17.

    Signal 17 is SIGCHLD (at least if you're running Linux on x86), which means "Child [process] stopped or terminated".

    Without knowing more about your specific application context, I have no idea why that SIGCHLD occurs.