X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=i3o6 Aa+2bIsGsA1O+T+tYHBf0Iah6uNRjFXTOtKt3D0RftFqDedBhB90FEClN+E25nTW YsqRAIexpTN2st79JcD7XRBWTs61xJxTo2P055E9D6+cbcYn+FYQSrOev/354KZJ xWREN7ZLeyiPdta/DYtSNIrxQ6S6DbH+wfCr88s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=qjlDE/FNr+ 1bBAXKoG7Smkx9BPE=; b=pDg3ZKLwB2Nt8Mbgz1OG1AQOsmiyNVL1h4OgYoBAIl akr/k6i3mlwCyu3YydTqYCR0dGzGLC9PDJNhcC3rwwtnXANLobgHHfjOYrEEPcxZ KfMeMZYNLy/L4EX9pk4aolwM/MGMXMlBYVeb3Ag+FJDsCTzofjeGZ/s7oKlvg9zh c= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: Regression (last snapshot) To: cygwin AT cygwin DOT com References: <20190729134700 DOT GO11632 AT calimero DOT vinschen DOT de> <20190729152327 DOT GQ11632 AT calimero DOT vinschen DOT de> <20190729154049 DOT GR11632 AT calimero DOT vinschen DOT de> <8e57d4da-722d-1b9a-bd28-5f96ed182f6a AT cornell DOT edu> <0a09679b-1a0f-613b-04c8-1a63da8a00c2 AT cornell DOT edu> <33aead20-540c-ee3b-0d38-ff053fbac040 AT dronecode DOT org DOT uk> <12269538-c387-1f1e-ab5a-b36b60d09937 AT cornell DOT edu> <20190801160440 DOT GC11632 AT calimero DOT vinschen DOT de> <19e73527-cb9a-a106-a57a-2895b8a520c9 AT cornell DOT edu> <5f4a0400-a173-1948-6048-69ba54df2571 AT SystematicSw DOT ab DOT ca> <400eebe3-3ba9-5448-85a8-92e6e0dfdf0c AT cornell DOT edu> From: Eric Blake Openpgp: preference=signencrypt Message-ID: <1d2c03d5-8534-405e-b150-c899508712fc@redhat.com> Date: Fri, 2 Aug 2019 16:58:15 -0500 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 --5GNYL5FVbvhWKwkcYi8ZWQFuYVsSbiHBg Content-Type: multipart/mixed; boundary="o6AwRlAcTU2iA4eU1B5xawCboGLAimmgW"; protected-headers="v1" From: Eric Blake To: cygwin AT cygwin DOT com Message-ID: <1d2c03d5-8534-405e-b150-c899508712fc AT redhat DOT com> Subject: Re: Regression (last snapshot) References: <20190729134700 DOT GO11632 AT calimero DOT vinschen DOT de> <20190729152327 DOT GQ11632 AT calimero DOT vinschen DOT de> <20190729154049 DOT GR11632 AT calimero DOT vinschen DOT de> <8e57d4da-722d-1b9a-bd28-5f96ed182f6a AT cornell DOT edu> <0a09679b-1a0f-613b-04c8-1a63da8a00c2 AT cornell DOT edu> <33aead20-540c-ee3b-0d38-ff053fbac040 AT dronecode DOT org DOT uk> <12269538-c387-1f1e-ab5a-b36b60d09937 AT cornell DOT edu> <20190801160440 DOT GC11632 AT calimero DOT vinschen DOT de> <19e73527-cb9a-a106-a57a-2895b8a520c9 AT cornell DOT edu> <5f4a0400-a173-1948-6048-69ba54df2571 AT SystematicSw DOT ab DOT ca> <400eebe3-3ba9-5448-85a8-92e6e0dfdf0c AT cornell DOT edu> In-Reply-To: <400eebe3-3ba9-5448-85a8-92e6e0dfdf0c AT cornell DOT edu> --o6AwRlAcTU2iA4eU1B5xawCboGLAimmgW Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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" -----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--