Are there any standard exit status codes in Linux

0 votes
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, though I don't know if this is simply the convention where I work (the applications that failed like that have all been internal) or a standard.

Are there standard exit codes for processes in Linux?
Apr 25, 2022 in Linux Administration by Edureka
• 13,690 points
585 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Aside from 0 indicating success, there are no conventional exit codes. In addition, non-zero does not always imply failure.

EXIT FAILURE is set to 1 and EXIT SUCCESS is set to 0, but that's about it in the header file stdlib.h.

The 11 on segmentation fault is noteworthy since 11 is the signal number used by the kernel to terminate a process when it encounters a segmentation fault. There's probably a mechanism somewhere, either in the kernel or in the shell, that converts that to an exit code.
answered Apr 27, 2022 by Edureka
• 13,690 points

edited Mar 5

Related Questions In Linux Administration

0 votes
1 answer

How to change the owner of any folder in Linux system?

Hi@akhtar, Linux system has one command named chown. This ...READ MORE

answered Aug 14, 2020 in Linux Administration by MD
• 95,460 points
1,527 views
0 votes
0 answers

How to search any word in linux 'screen'

I am going to screen logs of ...READ MORE

Apr 13, 2022 in Linux Administration by Rahul
• 9,680 points
853 views
0 votes
0 answers

Is there a way to determine the amount of free video RAM in Linux?

We believe that we are running out ...READ MORE

Apr 26, 2022 in Linux Administration by Edureka
• 13,690 points
587 views
0 votes
0 answers
0 votes
1 answer

Are there any man pages that summarize bash scripting?

Regardless of whether man pages are exceptionally ...READ MORE

answered Jun 13, 2022 in Linux Administration by Korak
• 5,820 points
674 views
0 votes
0 answers

How to search any word in linux 'screen'

I am going screen logs of devstack ...READ MORE

Dec 14, 2022 in Linux Administration by erzan
• 630 points
671 views
+2 votes
2 answers

What is 755 permission in Linux?

Hi, File permission 755 means that the directory ...READ MORE

answered Dec 9, 2020 in Linux Administration by MD
• 95,460 points
281,187 views
–1 vote
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3, 2019 in Linux Administration by Omkar
• 69,220 points
2,937 views
0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Feb 1, 2019 in Linux Administration by Omkar
• 69,220 points
1,421 views
0 votes
1 answer

Finding pat of afile in linux

You can use readlink command: readlink -f filename.txt READ MORE

answered Mar 15, 2019 in Linux Administration by DareDev
• 6,890 points
1,095 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP