aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/compiler_exit_statuses.txt
blob: 8a54992747f62f0ea5ada97e338f2567e6bd086c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

software that use the exit status:
- shell
- git bisect
- build systems

common exit statuses:
   1 = EXIT_FAILURE = unspecific error
   2 = incorrect parameter syntax (defined as "serious trouble" in case of "ls")
 125 = maximum allowed exit status that is not used by bash

what are gcc and clang doing?
   1 = (all errors?) bad file syntax, file not found, bad parameter syntax

expected exit statuses:
125 = compilation failure (as opposed to test failure). Used by git bisect


perhaps the exit status for different errors should be configurable with a parameter?
- no, here is a much simpler solution:
  git bisect run sh -c "cslul || exit 125; bin/xxx-xxx/helloworld"