Subject: Re: bug#15575: 24.3.50; New tty menus crash Emacs

From: Eli Zaretskii <[email-masked]>
Date: Wed, 16 Oct 2013 21:34:24 +0300

> Date: Wed, 16 Oct 2013 19:48:37 +0200
> From: martin rudalics <[email-masked]>
> CC: [email-masked]
> 
> (gdb) tty /dev/pts/3

What is /dev/pts/3?  It should name an existing terminal.

> (gdb) show inferior-tty
> Terminal for future runs of program being debugged is "/dev/pts/3".
> (gdb) run -Q -nw
> Starting program: /home/martin/emacs/trunk/src/bootstrap-emacs -Q -nw
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [New Thread 0x7fffefd46700 (LWP 4629)]
> [Thread 0x7ffff7fcd960 (LWP 4626) exited]
> (gdb)
> 
> ... and it still tells me that my terminal is dumb.

Not sure why is dumb terminal relevant here.

Anyway, AFAIK the way to do this is as follows:

 gdb ./emacs
 (gdb) tty /dev/SOMETHING
 (gdb) r -Q -t /dev/SOMETHING

(Not sure if -t /dev/SOMETHING is necessary.)

But there seems to be some bug (or feature) in Emacs: it says "emacs:
Could not open file: /dev/tty" and quits.  Other programs work as
expected with the above recipe.  Maybe some Posix guru can find out
what's wrong or how to work around that.