- { close (2); dup (tty); }
- if (tty > 2)
- close(tty);
-#endif /* !go32 && !win32*/
-}
-\f
-/* Kill the inferior process. Make us have no inferior. */
-
-/* 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 */