mirror of
https://github.com/audacity/linuxdeploy.git
synced 2025-12-12 16:14:55 -06:00
Close file descriptors when process has exited
This commit is contained in:
parent
3c21d86574
commit
b6a1ba290e
@ -231,8 +231,14 @@ bool process::is_running() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (result == child_pid_) {
|
if (result == child_pid_) {
|
||||||
exited_ = true;
|
// TODO: extract the following lines from both this method and close() to eliminate duplicate code
|
||||||
|
close_pipe_fd_(stdout_fd_);
|
||||||
|
stdout_fd_ = -1;
|
||||||
|
|
||||||
|
close_pipe_fd_(stderr_fd_);
|
||||||
|
stderr_fd_ = -1;
|
||||||
|
|
||||||
|
exited_ = true;
|
||||||
exit_code_ = check_waitpid_status_(status);
|
exit_code_ = check_waitpid_status_(status);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user