Skip to content

Commit

Permalink
Shell: Don't pass nonsense options to waitpid()
Browse files Browse the repository at this point in the history
I had these options confused with the options for waitid()
  • Loading branch information
awesomekling committed Feb 25, 2020
1 parent 423c48b commit 559a99c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shell/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ static int run_command(const String& cmd)
for (size_t i = 0; i < children.size(); ++i) {
auto& child = children[i];
do {
int rc = waitpid(child.pid, &wstatus, WEXITED | WSTOPPED);
int rc = waitpid(child.pid, &wstatus, 0);
if (rc < 0 && errno != EINTR) {
if (errno != ECHILD)
perror("waitpid");
Expand Down

0 comments on commit 559a99c

Please sign in to comment.