Are there any standard exit status codes in Linux?

后端 未结 10 1690
醉话见心
醉话见心 2020-11-22 06:46

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

10条回答
  •  醉话见心
    2020-11-22 06:56

    Standard Unix exit codes are defined by sysexits.h, as another poster mentioned. The same exit codes are used by portable libraries such as Poco - here is a list of them:

    http://pocoproject.org/docs/Poco.Util.Application.html#16218

    A signal 11 is a SIGSEGV (segment violation) signal, which is different from a return code. This signal is generated by the kernel in response to a bad page access, which causes the program to terminate. A list of signals can be found in the signal man page (run "man signal").

提交回复
热议问题