delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/16/20:12:46

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Reply-To: <dan AT danamis DOT com>
From: "Dan Higgins" <DanHiggins AT austin DOT rr DOT com>
To: "Randall R Schulz" <rrschulz AT cris DOT com>, <cygwin AT cygwin DOT com>
Subject: RE: Broken since 1.3.10, or earlier
Date: Tue, 16 Jul 2002 19:14:41 -0500
Message-ID: <ACEIKCIGAEOGOHGPJPIAIEBLCDAA.DanHiggins@austin.rr.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
In-Reply-To: <5.1.0.14.2.20020716164508.02e9fc30@pop3.cris.com>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

Ah, it has been a few *years* since I checked the grep man page. Who
would've thought, someone has been improving it all that time...  :)

Thanks for the excellent response.

Cheers,
-Dan
Austin, TX, USA


> -----Original Message-----
> From: Randall R Schulz [mailto:rrschulz AT cris DOT com]
> Sent: Tuesday, July 16, 2002 7:01 PM
> To: dan AT danamis DOT com; cygwin AT cygwin DOT com
> Subject: Re: Broken since 1.3.10, or earlier
>
>
> Dan,
>
> I take it that by "inconsistent" you mean the relative ordering of the
> output of the "grep" processes and of the "echo" commands is not
> the strict
> alternation you'd expect.
>
> That's what I see, anyway. I even saw two lines of grep output
> that follow
> the shell prompt printed after the command "completes."
>
> It seems there's some asynchrony in the processing of the output and that
> somehow, in effect, there's a race condition.
>
> I believe we've seen other reports of similar problems.
>
> Someone who knows about the internal architecture of I/O processing in
> Cygwin might be able to shed some light on this. If, for example, there's
> some kind of queuing of I/O operations in Cygwin1.dll between the
> application code (grep or a shell, in this case) and the Windows I/O
> primitives, then there might be an opportunity for this kind of
> asynchrony.
>
> It's too bad strace cannot solve this one, but since there's the
> shell plus
> one grep for each file to be examined, it's not going to help resolve
> relative timing issues.
>
>
> Lest you think this is just idle speculation ... Well it is ...
> But here's
> a concrete suggestion on a work-around:
>
> grep -R --include='*.java' Copyright .
>
>
> If you need those other lines interleaved with the just file
> names, you can
> do this:
>
> (grep    -R --include='*.java' Copyright tau rrs;
>   grep -l -R --include='*.java' Copyright tau rrs) |sort
>
> This may do everything twice, but on Cygwin, anyway, it's
> distinctly faster
> than your original, what with it's repeated invocation of grep.
>
> I hope you find that helpful.
>
>
> Randall Schulz
> Mountain View, CA USA
[...]


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019