This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regression (last snapshot)


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?
When SIGPIPE is not ignored, grep's failure to write to a pipe causes
termination before the failed write completes; but when it is ignored,
grep sees EPIPE from the failed write and reports that.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]