diff options
author | Kevin Adler <kadler@us.ibm.com> | 2020-10-31 05:35:44 (GMT) |
---|---|---|
committer | Kevin Adler <kadler@us.ibm.com> | 2020-10-31 06:02:37 (GMT) |
commit | 7ea6c537d2968effb024634a6367a1a1b4cafeb4 (patch) | |
tree | d4215b7068389d83e05f074775ca293e07d734a5 /src/eval_env.cc | |
parent | d45ff8ebf88ef4add46a80ccdfc2d97a8b4b091b (diff) | |
download | Ninja-7ea6c537d2968effb024634a6367a1a1b4cafeb4.zip Ninja-7ea6c537d2968effb024634a6367a1a1b4cafeb4.tar.gz Ninja-7ea6c537d2968effb024634a6367a1a1b4cafeb4.tar.bz2 |
Handle process signalling correctly on AIX
POSIX shells set the exit code to 128 + the signal number, which
coincidentally matches the layout used by the WIFSIGNALLED/WTERMSIG
macros on most Unix-like systems, but not on AIX. Instead, AIX stores
the signal value in the bottom 8 bits and also bits 16-23. The only time
ninja currently handles signals correctly is when the shell used to call
the program dies via signal.
To handle both scenarios, we detect the shell exit code format and
convert it to the format that the WIFSIGNALED/WTERMSIG macros expect.
Fixes #1623
Diffstat (limited to 'src/eval_env.cc')
0 files changed, 0 insertions, 0 deletions