From 59957f85f46ca1b35a88ca4e8b4c5fe6e0c3d0eb Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 21 Sep 2001 14:09:22 +0000 Subject: [PATCH] (wait_for_termination) [POSIX_SIGNALS]: Terminate only if kill returns -1, and errno is ESRCH. --- src/ChangeLog | 5 +++++ src/sysdep.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 29375b80679..7aae3f9aba3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-09-21 Gerd Moellmann + + * sysdep.c (wait_for_termination) [POSIX_SIGNALS]: Terminate + only if kill returns -1, and errno is ESRCH. + 2001-09-21 Markus Rost * Makefile.in (shortlisp): Add ../lisp/env.elc. diff --git a/src/sysdep.c b/src/sysdep.c index 2a0f5df4d90..5f528f0f51c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -480,7 +480,8 @@ wait_for_termination (pid) #else /* neither BSD_SYSTEM nor UNIPLUS: random sysV */ #ifdef POSIX_SIGNALS /* would this work for LINUX as well? */ sigblock (sigmask (SIGCHLD)); - if (0 > kill (pid, 0)) + errno = 0; + if (kill (pid, 0) == -1 && errno == ESRCH) { sigunblock (sigmask (SIGCHLD)); break; -- 2.39.2