zsh-workers
 help / color / mirror / code / Atom feed
* long-standing tty related issue: wrapped Emacs not suspended
@ 2018-09-20 12:30 Vincent Lefevre
  2018-09-20 15:43 ` Joey Pabalinas
  2018-09-21 16:57 ` Peter Stephenson
  0 siblings, 2 replies; 17+ messages in thread
From: Vincent Lefevre @ 2018-09-20 12:30 UTC (permalink / raw)
  To: zsh-workers

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@vinc17.net> - 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)

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-10-02 15:32 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-20 12:30 long-standing tty related issue: wrapped Emacs not suspended Vincent Lefevre
2018-09-20 15:43 ` Joey Pabalinas
2018-09-20 23:10   ` Vincent Lefevre
2018-09-21 16:57 ` Peter Stephenson
2018-09-21 23:14   ` Joey Pabalinas
2018-09-22  1:17   ` Bart Schaefer
2018-09-22  5:51     ` Joey Pabalinas
2018-09-22 18:54       ` Vincent Lefevre
2018-09-22 21:27         ` Joey Pabalinas
2018-09-23  7:21           ` Vincent Lefevre
2018-09-24 19:51   ` Peter Stephenson
2018-09-25 10:37     ` Peter Stephenson
2018-09-25 17:04       ` Daniel Shahaf
2018-09-26  5:47       ` Bart Schaefer
2018-09-26 13:41         ` Peter Stephenson
2018-09-26 15:17         ` Peter Stephenson
     [not found]         ` <20180926161708.39be6402@camnpupstephen.cam.scsc.local>
2018-10-02 15:32           ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).