Mercurial > emacs
changeset 39374:54dd36cef0e2
(wait_for_termination) [POSIX_SIGNALS]: Terminate
only if kill returns -1, and errno is ESRCH.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 21 Sep 2001 14:09:02 +0000 |
parents | f706cd16b765 |
children | 7eccdd28d65e |
files | src/sysdep.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sysdep.c Fri Sep 21 13:39:07 2001 +0000 +++ b/src/sysdep.c Fri Sep 21 14:09:02 2001 +0000 @@ -480,7 +480,8 @@ #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;