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!
2 Answers
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.

- 9,640
- 14
- 54
- 108
-
Thank you so much! Please see my follow-up below, if you have time. – Amittai Aviram Mar 14 '11 at 17:08
It looks like this is the status value obtained from wait()
or waitpid()
, which is not the same as the exit status. The macros WIFEXITED()
, WIFSIGNALED()
, WIFSTOPPED()
, and WIFCONTINUED()
should be used on the status value to determine its meaning. In this case it looks like WIFSTOPPED()
would be true for this value of status, which means that the child process was stopped.

- 58,919
- 18
- 87
- 102
-
I see. Thanks to both of you (Marnix Klooster and mark4o). This is indeed the value captured by waitpid from a child process, so it makes sense that the system killed the child process with SIGCHLD. However, that raises the question of why the system killed the child process. If the child process causes a segmentation fault, would the kernel send a SIGCHLD without printing a "segmentation fault" message to stderr? Thanks again. – Amittai Aviram Mar 14 '11 at 17:07
-
If `WIFSTOPPED()` is true that indicates that the process was stopped (suspended), not terminated. As for the message on stderr (e.g. "Segmentation fault"), that is displayed by the shell, for its own child processes. In this case the process is your child, not a child of the shell, so it would be your responsibility if you want to report its status to the user (you can do that using psignal or psiginfo: http://www.kernel.org/doc/man-pages/online/pages/man3/psignal.3.html). – mark4o Mar 15 '11 at 03:23