From 61daed9c2e1f6e305893fac894c2831803658ddb Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 14 Oct 2022 23:49:45 -0500 Subject: [PATCH] Ahem, make that _exit_status_ 127 (what you get when you run a command that doesn't exist at the command line), not killed by signal 127. --- lib/xwrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xwrap.c b/lib/xwrap.c index 3c89557c..7af2edff 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -339,7 +339,7 @@ pid_t xpopen_both(char **argv, int *pipes) // Wait for child process to exit, then return adjusted exit code. int xwaitpid(pid_t pid) { - int status = 127; + int status = 127<<8; while (-1 == waitpid(pid, &status, 0) && errno == EINTR) errno = 0; -- 2.39.2