From 7327d007eb2ac22e85965fd25425060c4f4aea63 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 15 Sep 1997 03:01:50 +0000 Subject: Fix bsd_to_*_sigaction(). Also add SA_SIGINFO support --- sys/compat/ibcs2/ibcs2_signal.c | 4 ++-- sys/compat/osf1/osf1_signal.c | 16 ++++++++++------ sys/compat/svr4/svr4_signal.c | 16 ++++++++++------ 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/sys/compat/ibcs2/ibcs2_signal.c b/sys/compat/ibcs2/ibcs2_signal.c index 1f381b810ad..ddbb52b4fb6 100644 --- a/sys/compat/ibcs2/ibcs2_signal.c +++ b/sys/compat/ibcs2/ibcs2_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ibcs2_signal.c,v 1.4 1997/06/02 09:42:08 deraadt Exp $ */ +/* $OpenBSD: ibcs2_signal.c,v 1.5 1997/09/15 03:01:44 deraadt Exp $ */ /* $NetBSD: ibcs2_signal.c,v 1.8 1996/05/03 17:05:27 christos Exp $ */ /* @@ -189,7 +189,7 @@ bsd_to_ibcs2_sigaction(bsa, isa) bsd_to_ibcs2_sigset(&bsa->sa_mask, &isa->sa_mask); isa->sa_flags = 0; if ((bsa->sa_flags & SA_NOCLDSTOP) != 0) - isa->sa_flags |= SA_NOCLDSTOP; + isa->sa_flags |= IBCS2_SA_NOCLDSTOP; } int diff --git a/sys/compat/osf1/osf1_signal.c b/sys/compat/osf1/osf1_signal.c index e7f0195e87a..7e99a8a5a51 100644 --- a/sys/compat/osf1/osf1_signal.c +++ b/sys/compat/osf1/osf1_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osf1_signal.c,v 1.3 1996/08/02 20:35:26 niklas Exp $ */ +/* $OpenBSD: osf1_signal.c,v 1.4 1997/09/15 03:01:47 deraadt Exp $ */ #include #include @@ -159,6 +159,8 @@ osf1_to_bsd_sigaction(osa, bsa) bsa->sa_flags |= SA_NOCLDSTOP; if ((osa->sa_flags & OSF1_SA_NODEFER) != 0) bsa->sa_flags |= SA_NODEFER; + if ((osa->sa_flags & OSF1_SA_SIGINFO) != 0) + bsa->sa_flags |= SA_SIGINFO; } void @@ -171,15 +173,17 @@ bsd_to_osf1_sigaction(bsa, osa) bsd_to_osf1_sigset(&bsa->sa_mask, &osa->sa_mask); osa->sa_flags = 0; if ((bsa->sa_flags & SA_ONSTACK) != 0) - osa->sa_flags |= SA_ONSTACK; + osa->sa_flags |= OSF1_SA_ONSTACK; if ((bsa->sa_flags & SA_RESTART) != 0) - osa->sa_flags |= SA_RESTART; + osa->sa_flags |= OSF1_SA_RESTART; if ((bsa->sa_flags & SA_NOCLDSTOP) != 0) - osa->sa_flags |= SA_NOCLDSTOP; + osa->sa_flags |= OSF1_SA_NOCLDSTOP; if ((bsa->sa_flags & SA_NODEFER) != 0) - osa->sa_flags |= SA_NODEFER; + osa->sa_flags |= OSF1_SA_NODEFER; if ((bsa->sa_flags & SA_RESETHAND) != 0) - osa->sa_flags |= SA_RESETHAND; + osa->sa_flags |= OSF1_SA_RESETHAND; + if ((bsa->sa_flags & SA_SIGINFO) != 0) + osa->sa_flags |= OSF1_SA_SIGINFO; } void diff --git a/sys/compat/svr4/svr4_signal.c b/sys/compat/svr4/svr4_signal.c index f635dc1ad6b..7d51f5610ce 100644 --- a/sys/compat/svr4/svr4_signal.c +++ b/sys/compat/svr4/svr4_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_signal.c,v 1.6 1997/06/02 09:42:15 deraadt Exp $ */ +/* $OpenBSD: svr4_signal.c,v 1.7 1997/09/15 03:01:49 deraadt Exp $ */ /* $NetBSD: svr4_signal.c,v 1.24 1996/12/06 03:21:53 christos Exp $ */ /* @@ -202,6 +202,8 @@ svr4_to_bsd_sigaction(ssa, bsa) bsa->sa_flags |= SA_NOCLDSTOP; if ((ssa->sa_flags & SVR4_SA_NODEFER) != 0) bsa->sa_flags |= SA_NODEFER; + if ((ssa->sa_flags & SVR4_SA_SIGINFO) != 0) + bsa->sa_flags |= SA_SIGINFO; } void @@ -214,15 +216,17 @@ bsd_to_svr4_sigaction(bsa, ssa) bsd_to_svr4_sigset(&bsa->sa_mask, &ssa->sa_mask); ssa->sa_flags = 0; if ((bsa->sa_flags & SA_ONSTACK) != 0) - ssa->sa_flags |= SA_ONSTACK; + ssa->sa_flags |= SVR4_SA_ONSTACK; if ((bsa->sa_flags & SA_RESETHAND) != 0) - ssa->sa_flags |= SA_RESETHAND; + ssa->sa_flags |= SVR4_SA_RESETHAND; if ((bsa->sa_flags & SA_RESTART) != 0) - ssa->sa_flags |= SA_RESTART; + ssa->sa_flags |= SVR4_SA_RESTART; if ((bsa->sa_flags & SA_NODEFER) != 0) - ssa->sa_flags |= SA_NODEFER; + ssa->sa_flags |= SVR4_SA_NODEFER; if ((bsa->sa_flags & SA_NOCLDSTOP) != 0) - ssa->sa_flags |= SA_NOCLDSTOP; + ssa->sa_flags |= SVR4_SA_NOCLDSTOP; + if ((bsa->sa_flags & SA_SIGINFO) != 0) + ssa->sa_flags |= SVR4_SA_SIGINFO; } void -- cgit v1.2.3