fix(library/process): do not strip signal information from child exit status

This should match the meaning of "$?" in bash:

"3.7.5 Exit Status

The exit status of an executed command is the value returned by the waitpid system call or equivalent function. Exit statuses fall between 0 and 255."

Fixes #1868
This commit is contained in:
Sebastian Ullrich 2017-11-13 17:13:06 +01:00
parent d7c90ecbf5
commit c838cdab34

View file

@ -324,7 +324,7 @@ struct unix_child : public child {
unsigned wait() override {
int status;
waitpid(m_pid, &status, 0);
return static_cast<unsigned>(WEXITSTATUS(status));
return static_cast<unsigned>(status);
}
};