This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Fix TUI on GNU/Linux
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 4 Dec 2004 12:23:53 -0500
- Subject: [commit] Fix TUI on GNU/Linux
As suggested in the bug report. If we use exit, then TUI's atexit
handler is run, which (A) suspends GDB and (B) messes up the terminal.
TUI still looks terrible if the program being debugged produces any
output; I guess you're expected to use attach or tty?
Checked in as obvious.
--
Daniel Jacobowitz
2004-12-04 Daniel Jacobowitz <dan@debian.org>
PR tui/1703
* linux-nat.c (linux_tracefork_child): Use _exit instead of exit.
Suggested by Joshua Neuheisel.
Index: linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-nat.c,v
retrieving revision 1.17
diff -u -p -r1.17 linux-nat.c
--- linux-nat.c 21 Nov 2004 20:10:02 -0000 1.17
+++ linux-nat.c 4 Dec 2004 17:19:23 -0000
@@ -147,7 +147,7 @@ linux_tracefork_child (void)
ptrace (PTRACE_TRACEME, 0, 0, 0);
kill (getpid (), SIGSTOP);
fork ();
- exit (0);
+ _exit (0);
}
/* Wrapper function for waitpid which handles EINTR. */