summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-09-30 20:20:22 +0000
committerjmallett <jmallett@FreeBSD.org>2002-09-30 20:20:22 +0000
commit0341f71df178fd346332ced28efb677a6ef39414 (patch)
tree44cc85d6d7a465b4410e0fa06f9f5a1b21bc40b6 /sys/compat
parente70c6b99c8b8b510eaef402242dd8cb86e300c6f (diff)
downloadFreeBSD-src-0341f71df178fd346332ced28efb677a6ef39414.zip
FreeBSD-src-0341f71df178fd346332ced28efb677a6ef39414.tar.gz
First half of implementation of ksiginfo, signal queues, and such. This
gets signals operating based on a TailQ, and is good enough to run X11, GNOME, and do job control. There are some intricate parts which could be more refined to match the sigset_t versions, but those require further evaluation of directions in which our signal system can expand and contract to fit our needs. After this has been in the tree for a while, I will make in kernel API changes, most notably to trapsignal(9) and sendsig(9), to use ksiginfo more robustly, such that we can actually pass information with our (queued) signals to the userland. That will also result in using a struct ksiginfo pointer, rather than a signal number, in a lot of kern_sig.c, to refer to an individual pending signal queue member, but right now there is no defined behaviour for such. CODAFS is unfinished in this regard because the logic is unclear in some places. Sponsored by: New Gold Technology Reviewed by: bde, tjr, jake [an older version, logic similar]
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linprocfs/linprocfs.c2
-rw-r--r--sys/compat/linux/linux_misc.c3
-rw-r--r--sys/compat/linux/linux_signal.c3
-rw-r--r--sys/compat/svr4/svr4_filio.c3
-rw-r--r--sys/compat/svr4/svr4_signal.c2
5 files changed, 9 insertions, 4 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index d0db293..af542b4 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -651,7 +651,7 @@ linprocfs_doprocstatus(PFS_FILL_ARGS)
* running on anything but i386, so ignore that for now.
*/
PROC_LOCK(p);
- sbuf_printf(sb, "SigPnd:\t%08x\n", p->p_siglist.__bits[0]);
+ sbuf_printf(sb, "SigPnd:\t%08x\n", 0); /* XXX */
/*
* I can't seem to find out where the signal mask is in
* relation to struct proc, so SigBlk is left unimplemented.
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 16c8677..d344548 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -36,6 +36,7 @@
#include <sys/imgact_aout.h>
#include <sys/jail.h>
#include <sys/kernel.h>
+#include <sys/ksiginfo.h>
#include <sys/lock.h>
#include <sys/mac.h>
#include <sys/malloc.h>
@@ -832,7 +833,7 @@ linux_wait4(struct thread *td, struct linux_wait4_args *args)
if ((error = wait4(td, &tmp)) != 0)
return error;
- SIGDELSET(td->td_proc->p_siglist, SIGCHLD);
+ signal_delete(td->td_proc, NULL, SIGCHLD);
if (args->status) {
if ((error = copyin((caddr_t)args->status, &tmpstat,
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 532fb81..d264db5 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -34,6 +34,7 @@
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/signalvar.h>
+#include <sys/ksiginfo.h>
#include <sys/syscallsubr.h>
#include <sys/sysproto.h>
@@ -390,7 +391,7 @@ linux_sigpending(struct thread *td, struct linux_sigpending_args *args)
#endif
PROC_LOCK(p);
- bset = p->p_siglist;
+ ksiginfo_to_sigset_t(p, &bset);
SIGSETAND(bset, p->p_sigmask);
bsd_to_linux_sigset(&bset, &lset);
PROC_UNLOCK(p);
diff --git a/sys/compat/svr4/svr4_filio.c b/sys/compat/svr4/svr4_filio.c
index c2bad1d..8dc1b4d 100644
--- a/sys/compat/svr4/svr4_filio.c
+++ b/sys/compat/svr4/svr4_filio.c
@@ -39,6 +39,7 @@
#include <sys/poll.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
+#include <sys/ksiginfo.h>
#include <sys/sysproto.h>
@@ -135,7 +136,9 @@ svr4_sys_read(td, uap)
DPRINTF(("sigmask = 0x%x\n", td->td_proc->p_sigmask));
DPRINTF(("sigignore = 0x%x\n", td->td_proc->p_sigignore));
DPRINTF(("sigcaught = 0x%x\n", td->td_proc->p_sigcatch));
+#if 0 /* XXX - use ksiginfo_to_sigset_t ? */
DPRINTF(("siglist = 0x%x\n", td->td_proc->p_siglist));
+#endif
}
#if defined(GROTTY_READ_HACK)
diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c
index fea5317..1c78b53 100644
--- a/sys/compat/svr4/svr4_signal.c
+++ b/sys/compat/svr4/svr4_signal.c
@@ -565,7 +565,7 @@ svr4_sys_sigpending(td, uap)
if (SCARG(uap, mask) == NULL)
return 0;
PROC_LOCK(td->td_proc);
- bss = td->td_proc->p_siglist;
+ ksiginfo_to_sigset_t(td->td_proc, &bss);
SIGSETAND(bss, td->td_proc->p_sigmask);
PROC_UNLOCK(td->td_proc);
bsd_to_svr4_sigset(&bss, &sss);
OpenPOWER on IntegriCloud