zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "zsh-workers@zsh.org" <zsh-workers@zsh.org>,
	John <da_audiophile@yahoo.com>
Subject: Re: Bug: ZSH crashes upon receiving SIGINT
Date: Tue, 10 Mar 2015 17:43:27 -0700	[thread overview]
Message-ID: <150310174327.ZM13990@torch.brasslantern.com> (raw)
In-Reply-To: <1396169464.3080953.1426025172139.JavaMail.yahoo@mail.yahoo.com>

On Mar 10, 10:06pm, John wrote:
}
} > we need to know what's going on here.
} 
} I agree with you. Most of the arch-chroot script is over my
} head. I have linked it here if the code within is meaningful and
} if you have the time to read through it. It is only 309 lines:
} http://pastebin.com/yDyuqxqi

I took at look at this script.  The "unmount" is coming from the
exit trap of the bash process that starts the whole thing off.

So I *think* what's happening is:

Bash starts "unshare" which becomes the TTY process group leader.

Unshare starts zsh which does not make itself the process group leader
(see previous -workers list discussions of zsh executing inside PID
namespaces, of which "unshare" creates one).

The ^C therefore is delivered to "unshare" which exits, ending the
bash script and executing the trap, which removes the tty device.

This causes zsh to get I/O error and exit.

It's *possible* that this is already "fixed" in development versions
of zsh, though most of the PID namespace changes had to do with avoiding
being process group leader rather than forcibily becoming so.  It's also
not clear that this is actually zsh's problem; it seems to me that the
arch-chroot script and/or "unshare" are not doing things they should be.


  reply	other threads:[~2015-03-11  0:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 17:46 John
2015-03-10 10:46 ` Peter Stephenson
2015-03-10 11:16   ` Peter Stephenson
2015-03-10 22:06   ` John
2015-03-11  0:43     ` Bart Schaefer [this message]
2015-03-11  9:44       ` Peter Stephenson
2015-03-11 19:55         ` Peter Stephenson
2015-03-11 18:38       ` John
2015-03-11 20:09         ` Peter Stephenson
2015-03-11 23:23           ` John
2015-03-11 23:31             ` Bart Schaefer
2015-03-11 23:47               ` John
2015-03-12  5:11                 ` Andrew Janke
2015-03-12 19:06                   ` John
2015-03-12 19:58                 ` Peter Stephenson
2015-03-13  4:00                   ` Bart Schaefer
2015-03-13  6:44       ` Han Pingtian

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=150310174327.ZM13990@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=da_audiophile@yahoo.com \
    --cc=zsh-workers@zsh.org \
    /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).