Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
long-standing tty related issue: wrapped Emacs not suspended
- X-seq: zsh-workers 43505
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: long-standing tty related issue: wrapped Emacs not suspended
- Date: Thu, 20 Sep 2018 14:30:05 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
A long-standing tty related issue...
I often run Emacs in background:
emacs &
This makes sense as it has its own X interface. But I sometimes do
this when I forgot that I was in a SSH session with no X forwarding,
and this makes the terminal unusable since Emacs is not suspended
and both zsh and Emacs try to get terminal input.
Now I've noticed that when I run the Emacs binary directly, Emacs
is suspended as expected. But when Emacs is wrapped in a function,
it is not suspended. After "zsh -f":
zira% e() { emacs -nw "$@"; }
zira% e &
I cannot quit Emacs or get the zsh prompt. I need to kill the
terminal.
I've tested the same thing with other shells: dash behaves like
zsh, and bash, ksh93 and mksh immediately terminate.
The same thing happens when using a sh script instead of a function.
Is this a bug? In any case, can this be solved?
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author