only if kill returns -1, and errno is ESRCH.
+2001-09-21 Gerd Moellmann <gerd@gnu.org>
+
+ * sysdep.c (wait_for_termination) [POSIX_SIGNALS]: Terminate
+ only if kill returns -1, and errno is ESRCH.
+
2001-09-21 Markus Rost <rost@math.ohio-state.edu>
* Makefile.in (shortlisp): Add ../lisp/env.elc.
#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;