about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2020-12-12 21:31:54 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2021-01-13 12:50:29 +0000
commit5b1316f78152a9c066b357ea9addf803d48e114a (patch)
treeb4f75026cdd7096c8bcf055f63466606c18faab5 /src/test/debuginfo/enum-thinlto.rs
parent9f3998b4aa9d0eea3249fdd48b8b719185673d16 (diff)
downloadrust-5b1316f78152a9c066b357ea9addf803d48e114a.tar.gz
rust-5b1316f78152a9c066b357ea9addf803d48e114a.zip
unix ExitStatus: Do not treat WIFSTOPPED as WIFSIGNALED
A unix wait status can contain, at least, exit statuses, termination
signals, and stop signals.

WTERMSIG is only valid if WIFSIGNALED.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html

It will not be easy to experience this bug with `Command`, because
that doesn't pass WUNTRACED.  But you could make an ExitStatus
containing, say, a WIFSTOPPED, from a call to one of the libc wait
functions.

(In the WIFSTOPPED case, there is WSTOPSIG.  But a stop signal is
encoded differently to a termination signal, so WTERMSIG and WSTOPSIG
are by no means the same.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions