-/* ARGSUSED */
-static void
-kill_command (arg, from_tty)
- char *arg;
- int from_tty;
-{
- /* FIXME: This should not really be inferior_pid (or target_has_execution).
- It should be a distinct flag that indicates that a target is active, cuz
- some targets don't have processes! */
-
- if (inferior_pid == 0)
- error ("The program is not being run.");
- if (!query ("Kill the program being debugged? "))
- error ("Not confirmed.");
- target_kill ();
-
- init_thread_list(); /* Destroy thread info */
-
- /* Killing off the inferior can leave us with a core file. If so,
- print the state we are left in. */
- if (target_has_stack) {
- printf_filtered ("In %s,\n", target_longname);
- if (selected_frame == NULL)
- fputs_filtered ("No selected stack frame.\n", gdb_stdout);
- else
- print_stack_frame (selected_frame, selected_frame_level, 1);
- }
-}
-\f
-/* Call set_sigint_trap when you need to pass a signal on to an attached
- process when handling SIGINT */
+#ifdef TIOCSCTTY
+ /* Make tty our new controlling terminal. */
+ if (ioctl (tty, TIOCSCTTY, 0) == -1)
+ /* Mention GDB in warning because it will appear in the inferior's
+ terminal instead of GDB's. */
+ warning (_("GDB: Failed to set controlling terminal: %s"),
+ safe_strerror (errno));
+#endif