From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18457 invoked by alias); 2 Aug 2019 21:58:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 18390 invoked by uid 89); 2 Aug 2019 21:58:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=libvirtorg, UD:libvirt.org, qemu.org, 1-919-301-3226 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Aug 2019 21:58:17 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B47A89AD0 for ; Fri, 2 Aug 2019 21:58:16 +0000 (UTC) Received: from [10.3.116.93] (ovpn-116-93.phx2.redhat.com [10.3.116.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 38D8819C6A for ; Fri, 2 Aug 2019 21:58:16 +0000 (UTC) Subject: Re: Regression (last snapshot) To: cygwin@cygwin.com References: <20190729134700.GO11632@calimero.vinschen.de> <20190729152327.GQ11632@calimero.vinschen.de> <20190729154049.GR11632@calimero.vinschen.de> <8e57d4da-722d-1b9a-bd28-5f96ed182f6a@cornell.edu> <0a09679b-1a0f-613b-04c8-1a63da8a00c2@cornell.edu> <33aead20-540c-ee3b-0d38-ff053fbac040@dronecode.org.uk> <12269538-c387-1f1e-ab5a-b36b60d09937@cornell.edu> <20190801160440.GC11632@calimero.vinschen.de> <19e73527-cb9a-a106-a57a-2895b8a520c9@cornell.edu> <5f4a0400-a173-1948-6048-69ba54df2571@SystematicSw.ab.ca> <400eebe3-3ba9-5448-85a8-92e6e0dfdf0c@cornell.edu> From: Eric Blake Openpgp: preference=signencrypt Message-ID: <1d2c03d5-8534-405e-b150-c899508712fc@redhat.com> Date: Fri, 02 Aug 2019 21:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <400eebe3-3ba9-5448-85a8-92e6e0dfdf0c@cornell.edu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5GNYL5FVbvhWKwkcYi8ZWQFuYVsSbiHBg" X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00033.txt.bz2 --5GNYL5FVbvhWKwkcYi8ZWQFuYVsSbiHBg Content-Type: multipart/mixed; boundary="o6AwRlAcTU2iA4eU1B5xawCboGLAimmgW"; protected-headers="v1" From: Eric Blake To: cygwin@cygwin.com Message-ID: <1d2c03d5-8534-405e-b150-c899508712fc@redhat.com> Subject: Re: Regression (last snapshot) References: <20190729134700.GO11632@calimero.vinschen.de> <20190729152327.GQ11632@calimero.vinschen.de> <20190729154049.GR11632@calimero.vinschen.de> <8e57d4da-722d-1b9a-bd28-5f96ed182f6a@cornell.edu> <0a09679b-1a0f-613b-04c8-1a63da8a00c2@cornell.edu> <33aead20-540c-ee3b-0d38-ff053fbac040@dronecode.org.uk> <12269538-c387-1f1e-ab5a-b36b60d09937@cornell.edu> <20190801160440.GC11632@calimero.vinschen.de> <19e73527-cb9a-a106-a57a-2895b8a520c9@cornell.edu> <5f4a0400-a173-1948-6048-69ba54df2571@SystematicSw.ab.ca> <400eebe3-3ba9-5448-85a8-92e6e0dfdf0c@cornell.edu> In-Reply-To: <400eebe3-3ba9-5448-85a8-92e6e0dfdf0c@cornell.edu> --o6AwRlAcTU2iA4eU1B5xawCboGLAimmgW Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Content-length: 1589 On 8/2/19 4:53 PM, Ken Brown wrote: >>> Putting this all together, Eric's explanation is indeed correct. All >>> processes created by xwin-xdg-menu via fork/exec inherit the property of >>> ignoring SIGPIPE. >>> >>> I don't know if this is a bug, but it certainly leads to surprising >>> behavior. Jon, maybe xwin-xdg-menu needs to call signal(SIGPIPE, >>> SIG_DFL) either after calling gtk_init() or before calling exec()? >> >> How does that relate to this only happening in the latest snapshot, and = not in >> the current release, or any Linux system? >=20 > It does happen in the current release, as I said earlier in the thread. >=20 > There's no way to test it on Linux. xwin-xdg-menu is a Cygwin-specific=20 > program (written by Jon). >> I would certainly expect any shell (or any other program handling pipes)= to set >> or reset SIGPIPE handling, rather than accept any default. >=20 > Take a look at the bash source code and the grep source code. You'll=20 > see that neither one of them does this. And I don't know why you would=20 > expect it. Worse, POSIX explicitly requires that the shell is unable to reset SIGPIPE back to SIG_DFL if it was inherited ignored (try it - you CANNOT use the 'trap' command to undo an inherited ignored SIGPIPE, even though it can be used to undo signals ignored locally). It is generally considered bad practice to leak ignored SIGPIPE into a child process, even if it makes sense in the parent process. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --o6AwRlAcTU2iA4eU1B5xawCboGLAimmgW-- --5GNYL5FVbvhWKwkcYi8ZWQFuYVsSbiHBg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 488 -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAl1EsfcACgkQp6FrSiUn Q2oVfwf/TvSI2sXGt5pWg7+q7bXPFM4gh8JnAYQI9c9Tg0UskDqhWizRQDQ7KSIK Xm9wRUMdFSbo+oS+zPc2LmdkuOytoyZd0WN33SUXtU5zQVgeto1St9RWX8go49nC SUR49TEn/nmf0km/zMipHHNAbLnrurCDM1WeYk6cNGg46nCznmsViPMAWeqrvEN1 wifRczTWRHsV08YuynynuzjMjP/w5HBhjSNLQ34R4eB2WPoQmUlpCtxXuKOgdSsq rOejbV6i/1+uGiXgKFHN7CG7TLGqxMvzb1QYMXWWJYZxWHI38CiUe2ROm5kjY+t7 IuzV/GolWoGzF5QXXQuBeZ4d99Erbw== =f+hS -----END PGP SIGNATURE----- --5GNYL5FVbvhWKwkcYi8ZWQFuYVsSbiHBg--