Reinstate the 4th argument to old signal handlers. Don't set it
when the handler uses siginfo_t.
This commit is contained in:
parent
0afa439d45
commit
77237db2b5
@ -533,11 +533,10 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
else {
|
||||
/* Old FreeBSD-style arguments. */
|
||||
sf.sf_arg2 = code;
|
||||
sf.sf_addr = (char *)regs->tf_err;
|
||||
sf.sf_ahu.sf_handler = catcher;
|
||||
}
|
||||
|
||||
sf.sf_addr = (char *) regs->tf_err;
|
||||
|
||||
/* save scratch registers */
|
||||
sf.sf_siginfo.si_sc.sc_eax = regs->tf_eax;
|
||||
sf.sf_siginfo.si_sc.sc_ebx = regs->tf_ebx;
|
||||
@ -687,6 +686,7 @@ sendsig(catcher, sig, mask, code)
|
||||
else {
|
||||
/* Old FreeBSD-style arguments. */
|
||||
sf.sf_siginfo = code;
|
||||
sf.sf_addr = (char *)regs->tf_err;
|
||||
sf.sf_ahu.sf_handler = catcher;
|
||||
}
|
||||
|
||||
|
@ -533,11 +533,10 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
||||
else {
|
||||
/* Old FreeBSD-style arguments. */
|
||||
sf.sf_arg2 = code;
|
||||
sf.sf_addr = (char *)regs->tf_err;
|
||||
sf.sf_ahu.sf_handler = catcher;
|
||||
}
|
||||
|
||||
sf.sf_addr = (char *) regs->tf_err;
|
||||
|
||||
/* save scratch registers */
|
||||
sf.sf_siginfo.si_sc.sc_eax = regs->tf_eax;
|
||||
sf.sf_siginfo.si_sc.sc_ebx = regs->tf_ebx;
|
||||
@ -687,6 +686,7 @@ sendsig(catcher, sig, mask, code)
|
||||
else {
|
||||
/* Old FreeBSD-style arguments. */
|
||||
sf.sf_siginfo = code;
|
||||
sf.sf_addr = (char *)regs->tf_err;
|
||||
sf.sf_ahu.sf_handler = catcher;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user