summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index f82b838..0941607 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1383,8 +1383,17 @@ kill(td, uap)
if (uap->pid > 0) {
/* kill single process */
- if ((p = pfind(uap->pid)) == NULL)
+ if ((p = pfind(uap->pid)) == NULL) {
+ if ((p = zpfind(uap->pid)) != NULL) {
+ /*
+ * IEEE Std 1003.1-2001: return success
+ * when killing a zombie.
+ */
+ PROC_UNLOCK(p);
+ return (0);
+ }
return (ESRCH);
+ }
error = p_cansignal(td, p, uap->signum);
if (error == 0 && uap->signum)
psignal(p, uap->signum);
OpenPOWER on IntegriCloud