From 938afb4d7acb9974d5789dfe4e322c0ccce0541e Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 10 Feb 2022 15:00:24 -0500 Subject: Fix bug in exit status returned by close for a previously exited process. --- io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 1d440c1e..07d83689 100644 --- a/io.c +++ b/io.c @@ -2599,7 +2599,7 @@ wait_any(int interesting) /* pid of interest, if any */ for (redp = red_head; redp != NULL; redp = redp->next) if (interesting == redp->pid) { redp->pid = -1; - redp->status = status; + redp->status = sanitize_exit_status(status); break; } } @@ -2629,7 +2629,7 @@ wait_any(int interesting) /* pid of interest, if any */ for (redp = red_head; redp != NULL; redp = redp->next) if (pid == redp->pid) { redp->pid = -1; - redp->status = status; + redp->status = sanitize_exit_status(status); break; } } -- cgit v1.2.3