version 1.95.2.1, 1997/09/08 23:27:39 |
version 1.96, 1997/09/11 23:01:48 |
|
|
* but would break init; should be fixed soon. |
* but would break init; should be fixed soon. |
*/ |
*/ |
void |
void |
setregs(p, pack, stack, retval) |
setregs(p, pack, stack) |
register struct proc *p; |
register struct proc *p; |
struct exec_package *pack; |
struct exec_package *pack; |
u_long stack; |
u_long stack; |
register_t *retval; |
|
{ |
{ |
struct frame *frame = (struct frame *)p->p_md.md_regs; |
struct frame *frame = (struct frame *)p->p_md.md_regs; |
|
|
Line 656 sendsig(catcher, sig, mask, code) |
|
Line 655 sendsig(catcher, sig, mask, code) |
|
register struct sigframe *fp, *kfp; |
register struct sigframe *fp, *kfp; |
register struct frame *frame; |
register struct frame *frame; |
register struct sigacts *psp = p->p_sigacts; |
register struct sigacts *psp = p->p_sigacts; |
register struct sigaction *sa = &psp->ps_sigact[sig]; |
|
register short ft; |
register short ft; |
int oonstack; |
int oonstack; |
extern short exframesize[]; |
extern short exframesize[]; |
Line 669 printf("sendsig %d %d %x %x %x\n", p->p_ |
|
Line 667 printf("sendsig %d %d %x %x %x\n", p->p_ |
|
|
|
frame = (struct frame *)p->p_md.md_regs; |
frame = (struct frame *)p->p_md.md_regs; |
ft = frame->f_format; |
ft = frame->f_format; |
oonstack = p->p_sigstk.ss_flags & SS_ONSTACK; |
oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; |
|
|
/* |
/* |
* Allocate and validate space for the signal handler |
* Allocate and validate space for the signal handler |
Line 679 printf("sendsig %d %d %x %x %x\n", p->p_ |
|
Line 677 printf("sendsig %d %d %x %x %x\n", p->p_ |
|
* the space with a `brk'. |
* the space with a `brk'. |
*/ |
*/ |
if ((psp->ps_flags & SAS_ALTSTACK) && oonstack == 0 && |
if ((psp->ps_flags & SAS_ALTSTACK) && oonstack == 0 && |
(sa->sa_flags & SA_ONSTACK)) { |
(psp->ps_sigonstack & sigmask(sig))) { |
fp = (struct sigframe *)(p->p_sigstk.ss_sp + |
fp = (struct sigframe *)(psp->ps_sigstk.ss_sp + |
p->p_sigstk.ss_size - sizeof(struct sigframe)); |
psp->ps_sigstk.ss_size - sizeof(struct sigframe)); |
p->p_sigstk.ss_flags |= SS_ONSTACK; |
psp->ps_sigstk.ss_flags |= SS_ONSTACK; |
} else |
} else |
fp = (struct sigframe *)frame->f_regs[SP] - 1; |
fp = (struct sigframe *)frame->f_regs[SP] - 1; |
if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize)) |
if ((unsigned)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize)) |
Line 704 printf("sendsig %d %d %x %x %x\n", p->p_ |
|
Line 702 printf("sendsig %d %d %x %x %x\n", p->p_ |
|
*/ |
*/ |
SIGACTION(p, SIGILL) = SIG_DFL; |
SIGACTION(p, SIGILL) = SIG_DFL; |
sig = sigmask(SIGILL); |
sig = sigmask(SIGILL); |
|
p->p_sigignore &= ~sig; |
|
p->p_sigcatch &= ~sig; |
p->p_sigmask &= ~sig; |
p->p_sigmask &= ~sig; |
psignal(p, SIGILL); |
psignal(p, SIGILL); |
return; |
return; |
Line 842 sys_sigreturn(p, v, retval) |
|
Line 842 sys_sigreturn(p, v, retval) |
|
* Restore the user supplied information |
* Restore the user supplied information |
*/ |
*/ |
if (scp->sc_onstack & 1) |
if (scp->sc_onstack & 1) |
p->p_sigstk.ss_flags |= SS_ONSTACK; |
p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK; |
else |
else |
p->p_sigstk.ss_flags &= ~SS_ONSTACK; |
p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK; |
p->p_sigmask = scp->sc_mask &~ sigcantmask; |
p->p_sigmask = scp->sc_mask &~ sigcantmask; |
frame = (struct frame *) p->p_md.md_regs; |
frame = (struct frame *) p->p_md.md_regs; |
frame->f_regs[SP] = scp->sc_sp; |
frame->f_regs[SP] = scp->sc_sp; |