The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

Views: 3,445     Votes:  6     ✅ Solution
Tag : scripts  
Link: 🔍 See Original Answer on Ask Ubuntu 🔗

URL: https://askubuntu.com/q/1040914
Title: Why is exit code 0 a Success and 1 a Failure
ID: /2018/05/27/Why-is-exit-code-0-a-Success-and-1-a-Failure
Created: May 27, 2018    Edited:  May 27, 2018
Upload: November 24, 2022    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


There can be many reasons for an error and a parent process will often know what specifically went wrong with a child process. As such 0 is used for success and 1 to 255 provides flexibility for failure reason(s).

For example a child process could return:

etc, etc.

⇧ Laptop not coming back from sleep after lid close Set of countdown timers with alarm  ⇩