zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: Subshell exiting, suspend problem
Date: Fri, 26 Sep 2003 17:38:54 +0000	[thread overview]
Message-ID: <1030926173854.ZM8282@candle.brasslantern.com> (raw)
In-Reply-To: <20030926165251.GA14940@clipper.ens.fr>

On Sep 26,  6:52pm, Nicolas George wrote:
} 
} There seems to be a problem with zsh process group handling: when zsh is
} invoked as an interactive subshell from a curses-based program (by
} example with :shell from vim, but the same is true with mutt, less,
} flrn...), when zsh exits, the calling process gets suspended for "tty
} output" (only if it is under job control, or else it makes a read
} error).

I was concerned that this would happen when Philippe Troin's patch from
zsh-workers/18319 was applied, but at the time I couldn't find a concrete
example.  I've been of the opinion that, except e.g. when zsh is started
by (the equivalent of) /bin/login as the first process on a terminal, it
should be up to the process that is starting zsh to decide what pgrp zsh
goes into, and zsh has no business acquiring anything.

The question is whether it's more important to work around buggy "su"
implementations, or to have philosophically correct behavior.
 
} [...] release_pgrp() is never called. The following patch
} fixes the problem:
[...]
} But I am not quite sure if this is exactly the right thing: maybe the
} correct condition is to call release_pgrp() if and only if
} acquire_pgrp() was called.

What effect does release_pgrp() have on any jobs started by zsh that are
still running in the background?  I suspect it would disown them.  This
is why I think zsh should not have called acquire_pgrp() in the first
place -- those background jobs should be in the pgrp of whatever is in
control of the terminal after zsh exits, so that they still receive any
HUP signals etc. when that parent process finally exits.


  reply	other threads:[~2003-09-27  2:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-26 16:52 Nicolas George
2003-09-26 17:38 ` Bart Schaefer [this message]
2003-09-27  3:21   ` Philippe Troin
2003-09-27 21:00     ` Bart Schaefer
2003-09-26 18:32 ` Philippe Troin
2003-10-03 20:58 ` [19140] " Danek Duvall
2003-10-03 22:06   ` Philippe Troin
2003-10-03 22:24     ` Danek Duvall
2003-10-08  7:04       ` Danek Duvall
2003-10-08  7:26         ` Philippe Troin
2003-10-17 16:54           ` Philippe Troin
2003-10-21  7:30             ` Danek Duvall

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=1030926173854.ZM8282@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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 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).