Don't kill already-reaped process.
* process.c (process_send_signal): Fix race condition where a subprocess was reaped by a signal handler between the check for liveness and calling 'kill', which meant that Emacs could in theory kill an innocent bystander process. Do the fix by blocking SIGCHLD in a critical section that checks liveness before killing. Fixes: debbugs:17561
Showing with 24 additions and 20 deletions