summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-09-07 19:12:53 +0000
committerjmallett <jmallett@FreeBSD.org>2002-09-07 19:12:53 +0000
commit8fa852ab6cdf5b1ce141d22c94030e707cc12e78 (patch)
treefd07f872673ceb4944146509a449b76b745b6460 /sys/alpha
parentd43e9d766b3d26149431a320d19532c19ad557e0 (diff)
downloadFreeBSD-src-8fa852ab6cdf5b1ce141d22c94030e707cc12e78.zip
FreeBSD-src-8fa852ab6cdf5b1ce141d22c94030e707cc12e78.tar.gz
Fill out two fields (si_pid, si_uid) in the siginfo structure handed back
to userland in the signal handler that were not being iflled out before, but should and can be. This part of sendsig could be slightly refactored to use an MI interface, or ideally, *sendsig*() would have an API change to accept a siginfo_t, which would be filled out by an MI function in the level above sendsig, and said MI function would make a small call into MD code to fill out the MD parts (some of which may be bogus, such as the si_addr stuff in some places). This would eventually make it possible for parts of the kernel sending signals to set up a siginfo with meaningful information. Reviewed by: mux MFC after: 2 weeks
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/machdep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index b880b3a..cf4cbe8 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -1387,6 +1387,8 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
sf.sf_si.si_signo = sig;
sf.sf_si.si_code = code;
sf.sf_si.si_addr = (void*)frame->tf_regs[FRAME_TRAPARG_A0];
+ sf.sf_si.si_pid = p->p_pid;
+ sf.sf_si.si_uid = p->p_ucred->cr_uid;
}
else
frame->tf_regs[FRAME_A1] = code;
OpenPOWER on IntegriCloud