all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Glenn Morris <rgm@gnu.org>
Cc: 1540@emacsbugs.donarmstrong.com
Subject: bug#1540: emacsclient -t fails under su
Date: Thu, 11 Dec 2008 13:19:58 -0800 (PST)	[thread overview]
Message-ID: <200812112119.mBBLJwj7001473@mothra.ics.uci.edu> (raw)
In-Reply-To: <uqoczi8o6x.fsf@fencepost.gnu.org> (Glenn Morris's message of "Thu, 11 Dec 2008 15:13:58 -0500")

Glenn Morris <rgm@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?






  reply	other threads:[~2008-12-11 21:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11 20:13 bug#1540: emacsclient -t fails under su Glenn Morris
2008-12-11 21:19 ` Dan Nicolaescu [this message]
2008-12-11 23:51   ` Glenn Morris
2008-12-12  1:02     ` Dan Nicolaescu
2008-12-12  1:31       ` Glenn Morris
2008-12-12  1:40         ` Processed: " Emacs bug Tracking System
2008-12-12 15:11       ` Andreas Schwab
2008-12-12  1:18     ` Dan Nicolaescu
2008-12-12 19:02       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812112119.mBBLJwj7001473@mothra.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=1540@emacsbugs.donarmstrong.com \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.