summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4/svr4_misc.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-09-29 15:12:18 +0000
committermarcel <marcel@FreeBSD.org>1999-09-29 15:12:18 +0000
commitbd000d73ad75473ad7201663ffb27c36ab130f0e (patch)
treebc01945dc4b7113b39c954abf475834f0e086487 /sys/compat/svr4/svr4_misc.c
parenta16d76cb5680cf0afd1a3be9be9d1f7ea686a96c (diff)
downloadFreeBSD-src-bd000d73ad75473ad7201663ffb27c36ab130f0e.zip
FreeBSD-src-bd000d73ad75473ad7201663ffb27c36ab130f0e.tar.gz
sigset_t change (part 4 of 5)
----------------------------- The compatibility code and/or emulators have been updated: iBCS2 now mostly uses the older syscalls. SVR4 now properly handles all signals. This has been achieved by using the new sigset_t throughout the emulator. The Linuxulator has been severely updated. Internally the new Linux sigset_t is made the default. These are then mapped to and from the new FreeBSD sigset_t. Also, rt_sigsuspend has been implemented in the Linuxulator. Implementing this syscall basicly caused all this sigset_t changing in the first place and the syscall has been used throughout the change as a means for testing. It basicly is too much work to undo the implementation so that it can later be added again. A special note on the use of sv_sigtbl and sv_sigsize in struct sysentvec: Every signal larger than sv_sigsize is not translated and is passed on to the signal handler unmodified. Signals in the range 1 upto and including sv_sigsize are translated. The rationale is that only the system defined signals need to be translated. The emulators also have been updated so that the translation tables are only indexed for valid (system defined) signals. This change also fixes the translation bug already in the SVR4 emulator.
Diffstat (limited to 'sys/compat/svr4/svr4_misc.c')
-rw-r--r--sys/compat/svr4/svr4_misc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 9535cba..9720abc 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -100,7 +100,6 @@
#define BSD_DIRENT(cp) ((struct dirent *)(cp))
-extern int bsd_to_svr4_sig[];
static int svr4_mknod __P((struct proc *, register_t *, char *,
svr4_mode_t, svr4_dev_t));
@@ -159,11 +158,11 @@ svr4_sys_wait(p, uap)
if (WIFSIGNALED(st)) {
sig = WTERMSIG(st);
if (sig >= 0 && sig < NSIG)
- st = (st & ~0177) | bsd_to_svr4_sig[sig];
+ st = (st & ~0177) | SVR4_BSD2SVR4_SIG(sig);
} else if (WIFSTOPPED(st)) {
sig = WSTOPSIG(st);
if (sig >= 0 && sig < NSIG)
- st = (st & ~0xff00) | (bsd_to_svr4_sig[sig] << 8);
+ st = (st & ~0xff00) | (SVR4_BSD2SVR4_SIG(sig) << 8);
}
/*
@@ -1119,7 +1118,7 @@ svr4_setinfo(p, st, s)
} else if (WIFSTOPPED(st)) {
sig = WSTOPSIG(st);
if (sig >= 0 && sig < NSIG)
- i.si_status = bsd_to_svr4_sig[sig];
+ i.si_status = SVR4_BSD2SVR4_SIG(sig);
if (i.si_status == SVR4_SIGCONT)
i.si_code = SVR4_CLD_CONTINUED;
@@ -1128,7 +1127,7 @@ svr4_setinfo(p, st, s)
} else {
sig = WTERMSIG(st);
if (sig >= 0 && sig < NSIG)
- i.si_status = bsd_to_svr4_sig[sig];
+ i.si_status = SVR4_BSD2SVR4_SIG(sig);
if (WCOREDUMP(st))
i.si_code = SVR4_CLD_DUMPED;
OpenPOWER on IntegriCloud