delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/18/15:53:20

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
From: "Ross Boulet" <ross AT rossb DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: limiting strace?, was: failure of unzip and recent cygwin1.dll
Date: Wed, 18 Feb 2004 14:50:27 -0600
Message-ID: <002601c3f660$db8a19a0$6401a8c0@RossLap>
MIME-Version: 1.0
In-Reply-To: <Pine.GSO.4.56.0402181458520.1284@slinky.cs.nyu.edu>
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i1IKrAOH000616

> On Wed, 18 Feb 2004, Ross Boulet wrote:
> 
[...snip...]
> > Just adding my 2 cents and hopefully to learn something:
> >
> > I know how to use pipes but I don't know how they are 
> handled "under the
> > covers".  Wouldn't piping the strace to tail or grep still produce a
> > temporary file of a large size?  I don't know if the 
> original poster is
> > concerned with disk space or only the output.  If it's a 
> space issue and a
> > temporary file is created for the pipe, I can see why he 
> would want to limit
> > the strace output directly.  If its just the result, it 
> seems tail or grep
> > would be good options.
> >
> > Ross
> 
> Pipes are direct process-to-process communication devices in 
> most (all?)
> modern operating systems.  Older systems (read: MS-DOS) 
> didn't have true
> pipes, and had to emulate them with redirection to temporary files.
> AFAIK, Cygwin doesn't use temporary files for pipes on any of 
> the systems
> that it runs on.
> 	Igor
Just for my own edification and at the risk of being slightly OT....

When you run:

$ foo | bar

I'm assuming the output from foo is stored in memory and then passed to bar
as the output is generated.  I deduce this from experience when I run

$ foo | less

Less starts processing the output as it comes in.  Less would obviously
require memory to store the entire output to facilitate paging back.
However, grep would be looking at each line and only keeping what its been
told.  So in

$ foo | grep sometext

Is the memory consumed by output from foo freed as soon as grep reads it and
sees that sometext is not in the output line?

Thanks,
Ross



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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