delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/03/19:31:37

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
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
MIME-Version: 1.0
Subject: Pipe behavior
Date: Thu, 3 Apr 2003 16:28:55 -0800
Message-ID: <D0720E03FE8450489330A332BDB176430102DD88@exchange.visionsolutions.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Steven Kilby" <skilby AT visionsolutions DOT com>
To: <cygwin AT cygwin DOT com>
X-OriginalArrivalTime: 04 Apr 2003 00:29:05.0092 (UTC) FILETIME=[32BDE840:01C2FA41]
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h340VbQ05793

Hello,

I have a question about pipe behavior.  I wrote a simple program that
does a printf, sleeps for 5 seconds and then another printf.  If I run
the program with the following way:  $ ./simple | cat  The output is
delayed until the program finished.  I guessed that the pipe is buffered
and doesn't flush until it is closed when the program ends.  But then I
ran the same program as an emacs subprocess and attached a buffer to it.
In this scenario the first printf is displayed, 5 seconds pass and then
the second printf is displayed.  Emacs also uses pipes so I do not
understand why the behavior is different. 

Thanks
Steven Kilby


Steven Kilby
Lead, Programmer Analyst
Vision Solutions, Inc.

17911 Von Karman Ave,  5th Floor
Irvine, CA 92614
UNITED STATES

Tel: +1 (949) 660-7479
Fax: +1 (949) 225-0287
Email: skilby AT visionsolutions DOT com
<http://www.visionsolutions.com/>
Disclaimer - 4/3/2003
The contents of this e-mail (and any attachments) are confidential, may be privileged, and may contain copyright material of Vision Solutions, Inc. or third parties. You may only reproduce or distribute the material if you are expressly authorized by Vision Solutions to do so. If you are not the intended recipient, any use, disclosure or copying of this e-mail (and any attachments) is unauthorized. If you have received this e-mail in error, please immediately delete it and any copies of it from your system and notify us via e-mail at helpdesk AT visionsolutions DOT com 


--
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