This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Almost-patch: gdb -vs- background
- To: gdb-patches at sources dot redhat dot com
- Subject: Almost-patch: gdb -vs- background
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 21 Nov 2000 22:34:10 -0700
- Reply-To: tromey at cygnus dot com
It is a well-known bug that you can't run Insight in the background.
Eventually gdb tries to access the controlling terminal and is
stopped.
This patch tries to fix the problem. However, it only works for the
termios case. I'm reluctant to recommend it for that reason.
I wonder if it would be better to just set `gdb_has_a_terminal_flag'
to `no' whenever use_windows is set.
Any comments on this?
Tom
Index: inflow.c
===================================================================
RCS file: /cvs/src/src/gdb/inflow.c,v
retrieving revision 1.3
diff -u -r1.3 inflow.c
--- inflow.c 2000/07/30 01:48:25 1.3
+++ inflow.c 2000/11/22 05:18:59
@@ -148,6 +149,8 @@
gdb_has_a_terminal_flag = yes;
#ifdef HAVE_TERMIOS
our_process_group = tcgetpgrp (0);
+ if (use_windows && our_process_group != getpgrp ())
+ gdb_has_a_terminal_flag = no;
#endif
#ifdef HAVE_TERMIO
our_process_group = getpgrp ();