Skip to content

utils: Don't consider exit status 255 to be signal 127

Simon McVittie requested to merge wip/smcv/no-signal-127 into master

Linux has 64 signals, numbered 1 to 64, of which signals 32 to 64 inclusive are the POSIX real-time signals. Older Linux versions had 31 signals, numbered 1 to 31.

Some utilities, like old versions of vulkaninfo(1), use exit(-1) to signal errors. This really results in exit status (unsigned char)(-1), or 255, which timeout(1) passes through as-is. This can't be 128 + a signal number, because there aren't that many signals in practice. Stop interpreting exit statuses as signals after 128+SIGRTMAX (in practice 128+64) instead.


Follow-up for T17193. I don't think this is vitally important, but it would make our diagnostics a little less confusing.

/cc @denittis @jpwhiting

Merge request reports

Loading