X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fprocess-unix.c;h=d50028ef325371d91a29483a83c4ee49f698af85;hb=ac155f65fdad732a944b5217c90d8340818e0c0a;hp=0063a6ef69c6104ae1bf6e57473e708b56834dd9;hpb=98a6e4055a1fa624c592ac06f79287d55196ca37;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.