mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 10:07:40 +00:00
Shell: Correct program stop behaviour
Prior to this, we would only wait for program exit; the shell should stop waiting once the program has been stopped. Fixes #2230
This commit is contained in:
parent
c6ddbd1f3e
commit
6fcdfe1169
1 changed files with 2 additions and 2 deletions
|
@ -1075,7 +1075,7 @@ static ExitCodeOrContinuationRequest run_command(const StringView& cmd)
|
|||
for (size_t i = 0; i < children.size(); ++i) {
|
||||
auto& child = children[i];
|
||||
do {
|
||||
int rc = waitpid(child.pid, &wstatus, 0);
|
||||
int rc = waitpid(child.pid, &wstatus, WSTOPPED);
|
||||
if (rc < 0 && errno != EINTR) {
|
||||
if (errno != ECHILD)
|
||||
perror("waitpid");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue