summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/alpha/syscallent.h2
-rw-r--r--signal.c18
2 files changed, 17 insertions, 3 deletions
diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h
index c7297cd..85c341a 100644
--- a/linux/alpha/syscallent.h
+++ b/linux/alpha/syscallent.h
@@ -76,7 +76,7 @@
{ 3, TD|TF, sys_open, "open" }, /* 45 */
{ 5, 0, printargs, "osf_old_sigaction" }, /* 46, not implemented */
{ 1, NF, sys_getgid, "getxgid" }, /* 47 */
- { 3, TS, printargs, "osf_sigprocmask" }, /* 48 */
+ { 2, TS, sys_sigprocmask, "osf_sigprocmask" }, /* 48 */
{ 5, 0, printargs, "osf_getlogin" }, /* 49, not implemented */
{ 5, 0, printargs, "osf_setlogin" }, /* 50, not implemented */
{ 1, TF, sys_acct, "acct" }, /* 51 */
diff --git a/signal.c b/signal.c
index bffdec0..5ff89e4 100644
--- a/signal.c
+++ b/signal.c
@@ -1180,13 +1180,27 @@ int
sys_sigprocmask(struct tcb *tcp)
{
#ifdef ALPHA
+ sigset_t ss;
if (entering(tcp)) {
+ /*
+ * Alpha/OSF is different: it doesn't pass in two pointers,
+ * but rather passes in the new bitmask as an argument and
+ * then returns the old bitmask. This "works" because we
+ * only have 64 signals to worry about. If you want more,
+ * use of the rt_sigprocmask syscall is required.
+ * Alpha:
+ * old = osf_sigprocmask(how, new);
+ * Everyone else:
+ * ret = sigprocmask(how, &new, &old, ...);
+ */
+ memcpy(&ss, &tcp->u_arg[1], sizeof(long));
printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
tprints(", ");
- printsigmask(tcp->u_arg[1], 0);
+ printsigmask(&ss, 0);
}
else if (!syserror(tcp)) {
- tcp->auxstr = sprintsigmask("old mask ", tcp->u_rval, 0);
+ memcpy(&ss, &tcp->u_rval, sizeof(long));
+ tcp->auxstr = sprintsigmask("old mask ", &ss, 0);
return RVAL_HEX | RVAL_STR;
}
#else /* !ALPHA */