summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_thr.c4
-rw-r--r--sys/sys/signal.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index d8f7a8e..17b6cd5 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -312,7 +312,7 @@ thr_kill(struct thread *td, struct thr_kill_args *uap)
error = 0;
ksiginfo_init(&ksi);
ksi.ksi_signo = uap->sig;
- ksi.ksi_code = SI_USER;
+ ksi.ksi_code = SI_LWP;
ksi.ksi_pid = p->p_pid;
ksi.ksi_uid = td->td_ucred->cr_ruid;
PROC_LOCK(p);
@@ -371,7 +371,7 @@ thr_kill2(struct thread *td, struct thr_kill2_args *uap)
if (error == 0) {
ksiginfo_init(&ksi);
ksi.ksi_signo = uap->sig;
- ksi.ksi_code = SI_USER;
+ ksi.ksi_code = SI_LWP;
ksi.ksi_pid = td->td_proc->p_pid;
ksi.ksi_uid = td->td_ucred->cr_ruid;
if (uap->id == -1) {
diff --git a/sys/sys/signal.h b/sys/sys/signal.h
index a7ca96e..a862057 100644
--- a/sys/sys/signal.h
+++ b/sys/sys/signal.h
@@ -338,6 +338,7 @@ struct sigaction {
#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */
/* message on an empty message queue. */
#define SI_KERNEL 0x10006
+#define SI_LWP 0x10007 /* Signal sent by thr_kill */
#endif
#if __BSD_VISIBLE
#define SI_UNDEFINED 0
OpenPOWER on IntegriCloud