From: Gerd Moellmann Date: Fri, 21 Sep 2001 14:09:22 +0000 (+0000) Subject: (wait_for_termination) [POSIX_SIGNALS]: Terminate X-Git-Tag: emacs-pretest-21.0.106~46 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59957f85f46ca1b35a88ca4e8b4c5fe6e0c3d0eb;p=emacs.git (wait_for_termination) [POSIX_SIGNALS]: Terminate only if kill returns -1, and errno is ESRCH. --- 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;