GNU bug report logs -
#1540
emacsclient -t fails under su
Previous Next
Full log
Message #6 received at 1540 <at> emacsbugs.donarmstrong.com (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> I'm logged into an X session as user1.
> From the xterm associated with /dev/pts/12, I do:
>
> user1> su - user2
> user2> emacs -Q -nw
>
> That works fine. Then I exit that Emacs and do:
I analyzed this about a year ago, but forgot about it :-(
> user2> emacs -Q -f server-start & # works fine
> user2> emacsclient -c # works fine
> user2> emacsclient -t
> *ERROR*: Could not open file: /dev/pts/12
>
> (and indeed user2 does not have permissions for this file)
One problem is here: when this happens the terminal data structure is
half created, so not complete, because of that when accessing the second
time...
> user2> emacsclient -t
>
> This second attempt kills Emacs with a segfault.
... we get a crash here.
Not sure what to do. The quick way out would be for emacsclient to
check if the tty is writable, and refuse to try to connect in case it is
not. But is that TRTD?
This bug report was last modified 16 years and 186 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.