summaryrefslogtreecommitdiff
path: root/src/libstddjb
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-06-29 07:55:12 +0000
committerLaurent Bercot <ska@appnovation.com>2023-06-29 07:55:12 +0000
commit109417b5defcd6d13c54b213c4f06272fcf0dc19 (patch)
tree2d6085bfeb560bd3c13386974a7b65ed8693c926 /src/libstddjb
parent28e09b5eb76919122f8baf57899154b3dd5fdaa0 (diff)
downloadskalibs-109417b5defcd6d13c54b213c4f06272fcf0dc19.tar.xz
posix_spawn workaround fixes
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb')
-rw-r--r--src/libstddjb/child_spawn_workaround.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/child_spawn_workaround.c b/src/libstddjb/child_spawn_workaround.c
index 00f8553..516ade5 100644
--- a/src/libstddjb/child_spawn_workaround.c
+++ b/src/libstddjb/child_spawn_workaround.c
@@ -25,7 +25,7 @@ pid_t child_spawn_workaround (pid_t pid, int const *p)
if (r == -1) return 0 ;
if (r) return (errno = EILSEQ, 0) ; /* child wrote, wtf */
- do e = waitid(P_PID, pid, &si, WNOHANG | WNOWAIT) ;
+ do e = waitid(P_PID, pid, &si, WEXITED | WNOHANG | WNOWAIT) ;
while (e == -1 && errno == EINTR) ;
if (e == -1) return pid ; /* we're in trouble, but don't leak a child */
if (!si.si_pid) return pid ; /* child is running */