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:from:to:subject:date:message-id:references :in-reply-to:content-type:content-id:content-transfer-encoding :mime-version; q=dns; s=default; b=buvT0Ebr+yHc2ZhSi10kcgB/gbXwD 6J7OV5U0LkdB0Zx0VtjM4GXCZygLY62hL+mJ7JKFC0gkfzz7FvHWBbUwm6j+V6lZ O5JWzTIJaFz+5RkWGhBitS93qAtVfFdJh6vq08cXqJRrAPHH9yfIYfgdqpi11iVq 3K5qzHLk8JjGP4= 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:from:to:subject:date:message-id:references :in-reply-to:content-type:content-id:content-transfer-encoding :mime-version; s=default; bh=S1dLGjB+6JmCGly5EFJCFq60YB8=; b=BBi OBeo/HhHbrpEYfPnXhHG+IjGqPf6aXFZnAAbOPjCaBKzk5hx7835yPIDeq7AVxwJ ss9+Y5yeqCk8DlOmFjlPq0I1zJHMzqjpzC46WQ4SA2RE9rxkjEEYulPWs9kjAwsz 8+MjfB42LQBFfebmx7mJ4TulLzk5fEuzZu3vcIQM= 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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: NAM01-BN3-obe.outbound.protection.outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H53scZRrqrk+H+mPgtO/8AReR9nYq2QmQZta98tAFNy4qKxPy3pOOCFtyu1m5BxaXGY3zsYnaOOM7misML83SqxBuDDccFL1ZsY/uZ0IKpgSI8M8eggrnXJAnIi9sL30megXQeZ39LbhFkuhhNBDdEMfu4X3lEnbjz7hteTPgfstOyiZmmytqpkk3Hr/duI9Nv/EX7VVN83A+LpREWSS7+iO748HvLizyw+I9CMvihKlsIICVB2dBopfFc+oWDyD+5yMSn216K3jVGEbnbHZzeK1BMdPqVksIOgWR2HBFqdycRHMUKj36m00x9kzXYaKQ3CxnEh75iTaOUW8rhtmkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8W19C7nwUqc5Z4EB2VpcAHK+vTTEmTEkrP2DMnylWBs=; b=bMjaf0+bt5wicN64y4yIECvqboPVuh65995Zdn5OTClCv/UueZIeieM3/4GUXuPAkeA+Oup3adXnJI9rOjQe+cR0KPNuIlB2AVkcz/cWwIYIHo7bw7Cu+yITS1R/DpwHIWIjEXYvQXknH14zyqig7J4NitjmM5+pFKn+bDueNlwEz1+cbpJl0AGx2OLV4QAC7nAJsUtHAnoFhS4fYgFFtLSZoOASomgnsmmfZvapmK3XVLob7ixg58c8vbnvNpQwaTVCNLcqMyS0DF8jkO8jBDjHkXVAOEHwUxL/KQD0gKBA9RqPFCEtxz9+XwZg7BJ9NUTUFfpiFJhd+nFrNr80dg== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=cornell.edu;dmarc=pass action=none header.from=cornell.edu;dkim=pass header.d=cornell.edu;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8W19C7nwUqc5Z4EB2VpcAHK+vTTEmTEkrP2DMnylWBs=; b=CXDLHzGQbXjWgCL8vDlPbcAS0k8XEJOozM7GT7VMhUhr0p2uThskGZc4p0RsnXuKpRoybo2sE/TMgNlyEb4LjGGzzMO8GjzUnQhikpGFutSnu1oo6JSAPb5C+NpkNvdcZw4cRruCzSBw9/cgoMFjSu/imK+7/jt6FuhQERQV4rs= From: Ken Brown To: "cygwin AT cygwin DOT com" Subject: Re: Regression (last snapshot) Date: Fri, 2 Aug 2019 02:32:47 +0000 Message-ID: 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> In-Reply-To: <19e73527-cb9a-a106-a57a-2895b8a520c9@cornell.edu> user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 authentication-results: spf=none (sender IP is ) smtp.mailfrom=kbrown AT cornell DOT edu; x-ms-oob-tlc-oobclassifiers: OLM:9508; received-spf: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-Type: text/plain; charset="utf-8" Content-ID: <2D9864BA5800A549B420635E45853D0E AT namprd04 DOT prod DOT outlook DOT com> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ksb2 AT cornell DOT edu X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x722XPPj020066 On 8/1/2019 5:17 PM, Ken Brown wrote: > On 8/1/2019 12:04 PM, Corinna Vinschen wrote: >> On Aug 1 10:38, Eric Blake wrote: >>> On 8/1/19 10:30 AM, Ken Brown wrote: >>> >>>>>> OK, when xwin-xdg-menu launches an application, it creates two pipes >>>>>> and sets >>>>>> the application's stdout and stderr to the write ends of those pipes. >>> >>>> Well, I can't be sure that the pipes are responsible. It's just that >>>> the existence of the pipes is the only difference I could spot between >>>> an ordinary terminal and a terminal started from xwin-xdg-menu. >>>> >>>> Is it possible that the logging somehow slows things down or changes the >>>> buffering, so that the grep process takes longer to complete? This >>>> would be consistent with my theory that the broken pipe error doesn't >>>> really represent a bug, but rather it reflects the fact that ls exits >>>> before grep has finished writing. >>> >>> Could it be a case of xwin-xdg-menu calling signal(SIGPIPE, SIG_IGN) or >>> similar, and accidentally letting grep inherit the ignored SIGPIPE? >> >> execve doesn't propagate the signal dispositions, they get reset to >> default. > > I just realized, as a result of Eric's comment, that the explanation > I've been pushing is nonsense. > > What I've been explaining is why there would be a broken pipe, and > therefore a SIGPIPE and EPIPE. But I now see that that's not the issue. > The issue is whether grep gets the SIGPIPE and terminates before it > has a chance to see the EPIPE. > > So if grep isn't ignoring SIGPIPE, the only other possibility I can > think of is that grep isn't receiving SIGPIPE, or at least that there's > a delay before it receives it. Why would that happen only in terminals > started by xwin-xdg-menu? I just built a version of grep in which I added 'signal(SIGPIPE, SIG_DFL)', and the error is gone. So it looks like grep has in fact been receiving SIGPIPE, and for some reason it is not using the default signal handler for SIGPIPE in a terminal started by xwin-xdg-menu. Could this be a gtk issue? Does it mess with the signal handlers? Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple