[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs daemon crash
From: |
John Shahid |
Subject: |
Re: emacs daemon crash |
Date: |
Fri, 21 Sep 2018 09:24:03 -0400 |
User-agent: |
mu4e 1.1.0; emacs 27.0.50 |
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 <address@hidden> 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.