version 1.37, 2012/02/19 21:06:57 |
version 1.38, 2012/07/18 20:30:07 |
Line 240 kill1(struct lwp *l, pid_t pid, ksiginfo |
|
Line 240 kill1(struct lwp *l, pid_t pid, ksiginfo |
|
if (pid > 0) { |
if (pid > 0) { |
/* kill single process */ |
/* kill single process */ |
mutex_enter(proc_lock); |
mutex_enter(proc_lock); |
p = proc_find(pid); |
p = proc_find_raw(pid); |
if (p == NULL) { |
if (p == NULL || (p->p_stat != SACTIVE && p->p_stat != SSTOP)) { |
mutex_exit(proc_lock); |
mutex_exit(proc_lock); |
return ESRCH; |
/* IEEE Std 1003.1-2001: return success for zombies */ |
|
return p ? 0 : ESRCH; |
} |
} |
mutex_enter(p->p_lock); |
mutex_enter(p->p_lock); |
error = kauth_authorize_process(l->l_cred, |
error = kauth_authorize_process(l->l_cred, |