A process is considered to have completed correctly in Linux if its exit status was 0.
I\'ve seen that segmentation faults often result in an exit status of 11, thou
There are no standard exit codes, aside from 0 meaning success. Non-zero doesn't necessarily mean failure either.
stdlib.h does define EXIT_FAILURE as 1 and EXIT_SUCCESS as 0, but that's about it.
The 11 on segfault is interesting, as 11 is the signal number that the kernel uses to kill the process in the event of a segfault. There is likely some mechanism, either in the kernel or in the shell, that translates that into the exit code.