+2005-12-02 Kevin Buettner <kevinb@redhat.com>
+
+ * ptrace-target.c (ptrace_break_program): Use SIGSTOP instead of
+ SIGINT to interrupt inferior process.
+ * thread-db.c (thread_db_break_program): Likewise.
+
2005-12-01 Kevin Buettner <kevinb@redhat.com>
* thread-db.c (handle_thread_db_event): Allow underlying target a
{
struct child_process *process = gdbserv_target_data (serv);
+ /* We send SIGSTOP (rather than some other signal such as SIGINT)
+ because SIGSTOP cannot be blocked or ignored. */
if (process->debug_backend)
- fprintf (stderr, " -- send SIGINT to child %d\n", process->pid);
- kill (process->pid, SIGINT);
+ fprintf (stderr, " -- send SIGSTOP to child %d\n", process->pid);
+ kill (process->pid, SIGSTOP);
}
/* get_trap_number vector
/* We always send the signal to the main thread. It's not correct
to use process->pid; that's whatever thread last reported a
- status, and it may well have been exiting. */
+ status, and it may well have been exiting.
+
+ We send SIGSTOP, rather than some other signal such as SIGINT,
+ because SIGSTOP cannot be blocked or ignored. On Linux, using
+ a signal that can be blocked means that the process never gets
+ interrupted, since it's the kernel which does the blocking. */
if (process->debug_backend)
- fprintf (stderr, " -- send SIGINT to child %d\n", proc_handle.pid);
- kill (proc_handle.pid, SIGINT);
+ fprintf (stderr, " -- send SIGSTOP to child %d\n", proc_handle.pid);
+ kill (proc_handle.pid, SIGSTOP);
}
/* Function: check_child_state