This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Regression (last snapshot)
- From: Ken Brown <kbrown at cornell dot edu>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Thu, 1 Aug 2019 21:17:44 +0000
- Subject: Re: Regression (last snapshot)
- 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
- 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=07luemviHRP7aCWYES6b39u0c8FFtNsUupRUEDJF+Xc=; b=nIvgJqOJPnX3qgyilnken9YtHjhcMkkIWl5Ns0q5YyyxTpOxUX2qYjODw+vu2QoqJAaMOjspgKg3lZSwb1lYRz6jf/i/lAMxgoM8FI+qW9pjR0UC2DmX1RQ7piGePsDdswP5epOwPUWveS1BNASn/VMYyfxn23HaE+v0hkGBEFx5/+1BlBn8b8E/1/aHweFon0COG0XgUWo1/5AP3OlCgioEDQrJTszOytJdbDskFAft3XAHus1jL/1HU6xC6SCnB17SKlNZbO3R73c5ANPEZKBTMZSPzqWoT5d7Ini1SBUCpoORaN+5UivXFy1bSDpwLaQ/iQO4JDg8RxFMLX7jZQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DrjofS2GnXr3V4aIlBcY7xYprTDuiCMitDEJ88rvzhONuaSsYEhHkP2EK/Dj2XC83CZDozwtWP8l0d38vXPV/DTdFwchsU1Zqdg2rI2QUzeWgLpSXMYACRtG2nLjH0Y0NKz1lBUZT6G1O/v2nVvCdVj4hj02gBJAQStc6nSRCtDYo7wELiSFJKGbsaoolYLkjwXxX7yN26zwLq3xgVSf+7Se04QHoKESLgOUXdh5TVFh32fIePZRNV/CdOb5NSyiN0DCKMRnuNxseygnkFt3XY4cAeK9M6k6QKx9xWm+2++TbpFgE8JLl4PCg71ev8SoA1ws2MSvhTx9RLIOs977BQ==
- References: <20190729134700.GO11632@calimero.vinschen.de> <ced2750a-0a52-1396-b6c1-f4228116bde7@cornell.edu> <20190729152327.GQ11632@calimero.vinschen.de> <20190729154049.GR11632@calimero.vinschen.de> <c5d01965-80b9-cece-54d2-f7462f84c0a2@cornell.edu> <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> <a61264b5-80da-52fc-7093-8e8d9a8ace33@redhat.com> <20190801160440.GC11632@calimero.vinschen.de>
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?
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