SIGCHLD defaulting, PPC spin insn fix
Roland McGrath
roland at redhat.com
Sun Dec 15 16:03:01 UTC 2002
Hi there again. I've committed the changes I posted last night.
Here are a couple more tiny things I turned up so far today:
2002-12-15 Roland McGrath <roland at redhat.com>
* strace.c (main) [! USE_PROCFS]: Always reset SIGCHLD to SIG_DFL.
* util.c [POWERPC] (LOOP): Fix value, now 0x48000000 (0: b 0b).
Old value was bogus, not even a proper instruction.
From Guy M. Streeter <streeter at redhat.com>.
Ok to commit?
Thanks,
Roland
Index: strace.c
===================================================================
RCS file: /cvsroot/strace/strace/strace.c,v
retrieving revision 1.31
diff -b -p -u -r1.31 strace.c
--- strace.c 6 Nov 2002 13:17:21 -0000 1.31
+++ strace.c 16 Dec 2002 00:00:52 -0000
@@ -548,6 +548,14 @@ char *argv[];
#ifdef USE_PROCFS
sa.sa_handler = reaper;
sigaction(SIGCHLD, &sa, NULL);
+#else
+ /* Make sure SIGCHLD has the default action so that waitpid
+ definitely works without losing track of children. The user
+ should not have given us a bogus state to inherit, but he might
+ have. Arguably we should detect SIG_IGN here and pass it on
+ to children, but probably noone really needs that. */
+ sa.sa_handler = SIG_DFL;
+ sigaction(SIGCHLD, &sa, NULL);
#endif /* USE_PROCFS */
if (trace() < 0)
Index: util.c
===================================================================
RCS file: /cvsroot/strace/strace/util.c,v
retrieving revision 1.30
diff -b -p -u -r1.30 util.c
--- util.c 7 Oct 2002 14:31:12 -0000 1.30
+++ util.c 16 Dec 2002 00:00:53 -0000
@@ -1233,7 +1233,7 @@ struct tcb *tcp;
#elif defined (ALPHA)
#define LOOP 0xc3ffffff
#elif defined (POWERPC)
-#define LOOP 0x0000feeb
+#define LOOP 0x48000000
#elif defined(ARM)
#define LOOP 0xEAFFFFFE
#elif defined(MIPS)
More information about the Strace-devel
mailing list