GNU bug report logs -
#70519
30.0.50; Device for Emacs terminal I/O
Previous Next
Full log
View this message in rfc822 format
I'd like to start Emacs under GDB, but so that Emacs doesn't use the
same terminal as GDB. It seems that the --terminal command line switch
is there for exactly this use case.
However, it doesn't work. Emacs parses the command line option and
replaces stdin and stdout with the correct device, but then in dispnew.c
it always calls init_tty with 0 as argument for the device name. That
simply opens the controlling terminal, i.e. /dev/tty and that is usually
the same device as the one that GDB uses.
What would you think of the change below?
Helmut
diff --git a/src/dispnew.c b/src/dispnew.c
index 0f5063c047f..cc5b883c138 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6710,7 +6710,8 @@ init_display_interactive (void)
init_foreground_group ();
/* Open a display on the controlling tty. */
- t = init_tty (0, terminal_type, 1); /* Errors are fatal. */
+ /* Errors are fatal. */
+ t = init_tty (ttyname (STDIN_FILENO), terminal_type, 1);
/* Convert the initial frame to use the new display. */
if (f->output_method != output_initial)
This bug report was last modified 1 year and 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.