X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fprocess-unix.c;h=d50028ef325371d91a29483a83c4ee49f698af85;hb=a699139716d7a947173ebc9a7130cc0eead5da7f;hp=0063a6ef69c6104ae1bf6e57473e708b56834dd9;hpb=1d9bc86590766427e2431876a50d78206a99edd5;p=chise%2Fxemacs-chise.git- diff --git a/src/process-unix.c b/src/process-unix.c index 0063a6e..d50028e 100644 --- a/src/process-unix.c +++ b/src/process-unix.c @@ -1541,8 +1541,17 @@ unix_kill_child_process (Lisp_Object proc, int signo, /* Finally send the signal. */ if (EMACS_KILLPG (pgid, signo) == -1) - error ("kill (%ld, %ld) failed: %s", - (long) pgid, (long) signo, strerror (errno)); + { + /* It's not an error if our victim is already dead. + And we can't rely on the result of killing a zombie, since + XPG 4.2 requires that killing a zombie fail with ESRCH, + while FIPS 151-2 requires that it succeeds! */ +#ifdef ESRCH + if (errno != ESRCH) +#endif + error ("kill (%ld, %ld) failed: %s", + (long) pgid, (long) signo, strerror (errno)); + } } /* Send signal SIGCODE to any process in the system given its PID.