all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Shahid <jvshahid@gmail.com>
To: hx <silent2600@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: emacs daemon crash
Date: Fri, 21 Sep 2018 09:24:03 -0400	[thread overview]
Message-ID: <87in2z0yrw.fsf@gmail.com> (raw)
In-Reply-To: <CAALPCHtDjBOyXWunbXe9SRqPjJVyBVZNwfNqpD99Mx9CJaG9LQ@mail.gmail.com>


I ran into similar problem a while ago when I had two accounts on my
machine one for personal use and another for work related stuff.

hx <silent2600@gmail.com> writes:

> emacs26 on i386 linux,
>
> two sessions both su from root to a normal user ( #su - user )
>
> 1$ emacs -nw -q --fg-daemon
>
>
> ### I should run "script /dev/null" first, but didn't
> 2$ emacsclient -t
> *ERROR*: Could not open file: /dev/pts/2

This is expected. The original pseudo terminal `dev/pts/2' in this case
is owned by root.  You start emacs as user `user' which doesn't have
read access to that device file.  You have three options here:

1. sudo chown user $(tty)
2. sudo chmod a+r $(tty)
3. use a multiplexer `tmux' or `screen' which will create a new pseudo
terminal owned by user `user'

> 2$ emacsclient -t
> ### daemon crash here.

This is definitely a bug, I have a debug build of Emacs locally and
managed to repro the problem and get the Lisp/C backtrace.  I will open
a bug shortly.  The short version is that we don't cleanup the terminal
we create in `Fmake_terminal_frame' when `emacs_open' return an error.
This causes following invocation to `Fmake_terminal_frame' to traverse
the list of terminals and invoke `get_named_terminal' on the
uninitialized terminal.



      parent reply	other threads:[~2018-09-21 13:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21  3:50 emacs daemon crash hx
2018-09-21  7:07 ` Eli Zaretskii
2018-09-21  8:57   ` hx
2018-09-24 13:24   ` John Shahid
2018-09-21 13:24 ` John Shahid [this message]

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=87in2z0yrw.fsf@gmail.com \
    --to=jvshahid@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=silent2600@gmail.com \
    /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.