From 63b26c9aca59a46dea2d3a0689bc295c4d8ddd9b Mon Sep 17 00:00:00 2001 From: lace <> Date: Wed, 11 Apr 2007 20:57:54 +0000 Subject: [PATCH] To be retrieved from Attic. --- debugger.c-childhandler.patch | 57 ------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 debugger.c-childhandler.patch diff --git a/debugger.c-childhandler.patch b/debugger.c-childhandler.patch deleted file mode 100644 index 4f07a79..0000000 --- a/debugger.c-childhandler.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- debugger.c 2007-04-07 10:17:12.000000000 +0200 -+++ debugger.c-childhandler 2007-04-07 10:16:39.000000000 +0200 -@@ -26,6 +26,13 @@ - #endif - } - -+static int attach_handler_count; -+ -+static void attach_handler (int signo) -+{ -+ attach_handler_count++; -+} -+ - /* Debugging only: Number of signal needing redelivery on PTRACE_ATTACH. */ - int attach_redelivered; - -@@ -40,6 +47,17 @@ - - delay (); - -+ attach_handler_count = 0; -+ /* Fill SA_SIGACTION _before_ SA_HANDLER as they may be in union! */ -+ act.sa_sigaction = NULL; -+ act.sa_handler = attach_handler; -+ i = sigemptyset (&act.sa_mask); -+ assert (i == 0); -+ act.sa_flags = -+ act.sa_restorer = NULL; -+ -+ attach_handler_orig = signal (SIGCHLD, attach_handler); -+ - i = ptrace (PTRACE_ATTACH, pid, NULL, NULL); - assert (i == 0); - -@@ -84,6 +102,22 @@ - assert (i == 0); - } - -+ attach_handler_orig = signal (SIGCHLD, attach_handler_orig); -+ assert (attach_handler_orig == attach_handler); -+ -+ if (stopped == 1 && attach_handler_count == 2) -+ stopped = 0; -+ else if (stopped == 1 && attach_handler_count == 1) -+ stopped = 1; -+ else if (stopped == 0 && attach_handler_count == 1) -+ stopped = 0; -+ else -+ { -+ fprintf (stderr, "stopped = %d, attach_handler_count = %d\n", stopped, -+ attach_handler_count); -+ abort (); -+ } -+ - delay (); - - return stopped; -- 1.8.3.1