linux-mips
[Top] [All Lists]

[patch] remove bogus "struct sigaction"

To: wakkerma@debian.org
Subject: [patch] remove bogus "struct sigaction"
From: Andrew Clausen <clausen@melbourne.sgi.com>
Date: Tue, 4 Feb 2003 17:29:44 +1100
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4i
Hi Wichert,

Somebody made their own "struct new_sigaction".  God knows why.

It should be #ifdef'd if it's actually useful to someone (right?),
but it's incompatible with linux-mips.  My patch... using the
struct sigaction out of the standard #includes... Works For Me TM.

Cheers,
Andrew


diff -rpu strace-4.4/signal.c strace-4.4-fixed/signal.c
--- strace-4.4/signal.c Sun Aug 19 22:06:50 2001
+++ strace-4.4-fixed/signal.c   Thu Jan 23 23:30:59 2003
@@ -1363,26 +1363,11 @@ typedef struct siginfo
 } siginfo_t;
 #endif
 
-/* Structure describing the action to be taken when a signal arrives.  */
-struct new_sigaction
-{
-       union
-       {
-               __sighandler_t __sa_handler;
-               void (*__sa_sigaction) (int, siginfo_t *, void *);
-       }
-       __sigaction_handler;
-       unsigned long sa_flags;
-       void (*sa_restorer) (void);
-       unsigned long int sa_mask[2];
-};
-
-
        int
 sys_rt_sigaction(tcp)
        struct tcb *tcp;
 {
-       struct new_sigaction sa;
+       struct sigaction sa;
        sigset_t sigset;
        long addr;
 
@@ -1399,7 +1384,7 @@ sys_rt_sigaction(tcp)
        else if (umove(tcp, addr, &sa) < 0)
                tprintf("{...}");
        else {
-               switch ((long) sa.__sigaction_handler.__sa_handler) {
+               switch ((long) sa.sa_handler) {
                        case (long) SIG_ERR:
                                tprintf("{SIG_ERR}");
                                break;
@@ -1410,8 +1395,7 @@ sys_rt_sigaction(tcp)
                                tprintf("{SIG_IGN}");
                                break;
                        default:
-                               tprintf("{%#lx, ",
-                                               (long) 
sa.__sigaction_handler.__sa_handler);
+                               tprintf("{%#lx, ", (long) sa.sa_handler);
                                sigemptyset(&sigset);
 #ifdef LINUXSPARC
                                if (tcp->u_arg[4] <= sizeof(sigset))


<Prev in Thread] Current Thread [Next in Thread>
  • [patch] remove bogus "struct sigaction", Andrew Clausen <=