From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27720 invoked by alias); 3 Feb 2015 12:41:45 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19793 Received: (qmail 10053 invoked from network); 3 Feb 2015 12:41:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bunkus.org; s=mail2015010901; t=1422966899; bh=gX6QOcj5w/R+rwhEK7CVIyj1h8b9I6lZqAhq3qDWsHY=; h=Date:From:To:Subject; b=O7XKVbo0vIkExSlV5mpl2PtVTxEO1xlF+grsGhFNFrfsKm03pPXcvhuxf3ixwEK/M m+UesLkS5MkNq7IuLloBZVzkDYCyqlL3ZaQDcD0mvR0ajQKmsh48EueuzxZB4eN7b0 Q8VKbDbrFPRHPY/y8MCmMFV5fiEn43BQtj+XsALhoPKIcnVdoLghb9bec4Khm6EaxK l8HMsYgn7MGM2QlG+pOi7oPjbFkg/UQuI/aq1mRKwVpiIHpne7PdMx0jACsmePvldn wd/+1sLderuG39kZ1+WpJ4UKKAtGsSyNK5WPz0IkNB7vOW4yt/Ws+KU72Yr7Kxc/y5 S2xUiNB0XlsJ4znfKxV31IPVIea74vYHyVRAq/GsKJsHdLKPVIfilIDhzx7y5doSFU PNFdRPoxkeHja3cv5Qe5I6R7vD6Ut3UNoXo0wG2ddUEEeehu07Jqru40VppRxSUHGq 3u3Vped3Y2U67Uifca9rsyERPF8Dn6CYWSOyo0ASiw/CJSGxgGG9NaoMCVpgnd52DJ gZugJ7i6BnKf9htkboRQZNSuWs7M2ZBNCzg1O11FAirQ8Pf4zRO3Lo2lmNsX/7oflJ TUjmBYx5JcDyKYnInFroWsYnsnYWK8dQKl9tbJoGWYw/LVo7tSSCZxKfiu1SHcA3XF Orb60EENT1hX7SIiGJpLde+0= Date: Tue, 3 Feb 2015 13:34:58 +0100 From: Moritz Bunkus To: zsh-users@zsh.org Subject: zsh inside systemd-nspawn and Ctrl+C Message-ID: <20150203123457.GH5783@bunkus.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R0UoHh4jwSc8qXKC" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: clamav-milter 0.98.6 at liselle X-Virus-Status: Clean --R0UoHh4jwSc8qXKC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, Summary: I'm running into the problem that Ctrl+C stops working when I run zsh inside a container via systemd-nspawn. Background: I've been using chroots into full distribution trees in order to build packages for several Linux distributions without running full-fledged virtual machines. It basically boiled down to bind-mounting a couple of directories and running =C2=BBchroot /bin/zsh=C2=AB inside the = correct directory. For several technical reasons I'm trying to switch to using systemd-nspawn. systemd-nspawn is setting up a container for the whole thing (meaning various namespaces and control groups) similar to lxc-start from lxc or OpenVZ. I don't run a full init inside that container but solely /bin/zsh. Now my problem. With the older method (chrooting) I could use Ctrl+C properly from inside the chrooted zsh. Meaning typing something and hitting Ctrl+C would abort the current line and give me a new pristine prompt. Not so with systemd-nspawn'd zsh: here Ctrl+c does nothing at all. However, if I run the very same systemd-nspawn with bash instead of zsh then bash will recognize Ctrl+C and act upon it properly. Some more information on what I've tried: - =C2=BBstty -a=C2=AB from systemd-nspawn'd zsh correctly shows =C2=BBintr = =3D ^C=C2=AB - Running =C2=BBcat=C2=AB from systemd-nspawn'd zsh and hitting Ctrl+C prin= ts the characters =C2=BB^C=C2=AB but cat is not aborted and keeps running. - Changing the interrupt key to Ctrl+X from systemd-nspawn'd zsh with =C2=BBstty intr \^X=C2=AB makes Ctrl+X not do anything anymore =E2=80=93 = just like Ctrl+C before that =C2=BBstty intr=E2=80=A6=C2=AB. - The same happens if I run zsh with --no-rcs. - The same happens running ssh'ed in from another machine and from inside konsole running in a local X server; both cases use different TERM environment variables (=C2=BBputty-256color=C2=AB for the ssh case a= nd =C2=BBxterm=C2=AB for the konsole/X case). The actual command line I'm using is something like the following: systemd-nspawn --directory=3D/other-linux/64/debian/jessie \ --machine=3D64-debian-jessie --tmpfs=3D/var/lock \ --setenv=3DSHELL=3D/bin/zsh5 --setenv=3DHOME=3D/root --user=3Droot \ -- /bin/zsh5 --no-rcs This is a stripped-down version that I've confirmed to not to work. zsh on the parent: 5.0.7; zsh inside the container: 5.0.7 (but I've confirmed this with several older zsh versions as well, e.g. Debian wheezy's 4.3.17). Any ideas how I might continue debugging this issue? At this point I don't even have an idea who the culprit might be (zsh? systemd-nspawn? Configuration files?), not to mention how to get it working. I'd appreciate any insight and will gladly provide more information if necessary. Thanks. Kind regards, mosu --R0UoHh4jwSc8qXKC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlTQwHEACgkQvM968LZXH8o4lQCfcBmtUM+wdfen4W2bex/J5k8q S2kAnApSeBZRZ6F2YIfHcfFoRuLN4JW+ =k9lR -----END PGP SIGNATURE----- --R0UoHh4jwSc8qXKC--