Skip to content

Commit

Permalink
Ignore stopped or continued children
Browse files Browse the repository at this point in the history
Only exited children are of interest here.

(cherry picked from commit 7de0f06)
  • Loading branch information
DemiMarie authored and marmarek committed May 12, 2023
1 parent 9efe28b commit 577a207
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daemon/qrexec-daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ static void reap_children()
while ((pid=waitpid(-1, &status, WNOHANG)) > 0) {
for (i = 0; i <= policy_pending_max; i++) {
if (policy_pending[i].pid == pid) {
if (!WIFEXITED(status))
continue;
status = WEXITSTATUS(status);
if (status != 0) {
if (policy_pending[i].response_sent != RESPONSE_PENDING) {
Expand Down

0 comments on commit 577a207

Please sign in to comment.