mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-07-06 17:00:07 -05:00
Check waitpid() for errors
This commit is contained in:
@@ -115,7 +115,11 @@ int process::close() {
|
||||
|
||||
{
|
||||
int temporary;
|
||||
waitpid(child_pid_, &temporary, 0);
|
||||
|
||||
if (waitpid(child_pid_, &temporary, 0) != 0) {
|
||||
throw std::logic_error{"waitpid() failed"};
|
||||
}
|
||||
|
||||
exit_code_ = WEXITSTATUS(temporary);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user