- According to specification, SI_USER code should only be generated by
standard kill(). On other systems, SI_LWP is generated by lwp_kill(). This will allow conforming applications to differentiate between signals generated by standard events and those generated by other implementation events in a manner compatible with existing practice. - Bump __FreeBSD_version
This commit is contained in:
parent
b57429d082
commit
baf28b69f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211732
@ -312,7 +312,7 @@ thr_kill(struct thread *td, struct thr_kill_args *uap)
|
|||||||
error = 0;
|
error = 0;
|
||||||
ksiginfo_init(&ksi);
|
ksiginfo_init(&ksi);
|
||||||
ksi.ksi_signo = uap->sig;
|
ksi.ksi_signo = uap->sig;
|
||||||
ksi.ksi_code = SI_USER;
|
ksi.ksi_code = SI_LWP;
|
||||||
ksi.ksi_pid = p->p_pid;
|
ksi.ksi_pid = p->p_pid;
|
||||||
ksi.ksi_uid = td->td_ucred->cr_ruid;
|
ksi.ksi_uid = td->td_ucred->cr_ruid;
|
||||||
PROC_LOCK(p);
|
PROC_LOCK(p);
|
||||||
@ -371,7 +371,7 @@ thr_kill2(struct thread *td, struct thr_kill2_args *uap)
|
|||||||
if (error == 0) {
|
if (error == 0) {
|
||||||
ksiginfo_init(&ksi);
|
ksiginfo_init(&ksi);
|
||||||
ksi.ksi_signo = uap->sig;
|
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_pid = td->td_proc->p_pid;
|
||||||
ksi.ksi_uid = td->td_ucred->cr_ruid;
|
ksi.ksi_uid = td->td_ucred->cr_ruid;
|
||||||
if (uap->id == -1) {
|
if (uap->id == -1) {
|
||||||
|
@ -338,6 +338,7 @@ struct sigaction {
|
|||||||
#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */
|
#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */
|
||||||
/* message on an empty message queue. */
|
/* message on an empty message queue. */
|
||||||
#define SI_KERNEL 0x10006
|
#define SI_KERNEL 0x10006
|
||||||
|
#define SI_LWP 0x10007 /* Signal sent by thr_kill */
|
||||||
#endif
|
#endif
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
#define SI_UNDEFINED 0
|
#define SI_UNDEFINED 0
|
||||||
|
Loading…
Reference in New Issue
Block a user