delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/11/25/07:26:58

Date: Tue, 25 Nov 1997 14:26:23 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Molnar Laszlo <molnarl AT cdata DOT tvnet DOT hu>
cc: djgpp-workers AT delorie DOT com,
Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Subject: Re: popen/pclose update
In-Reply-To: <347AA34A.4DFC829F@cdata.tvnet.hu>
Message-ID: <Pine.SUN.3.91.971125141928.27505a-100000@is>
MIME-Version: 1.0

On Tue, 25 Nov 1997, Molnar Laszlo wrote:

> Some problems with popen():

I didn't look at the code given your comments yet.  Later.

> My reimplementation does the same things as the original code when
> everything works ok, but I try to handle the possible errors too.
> Reorganizing the code also made it shorter (~80 lines vs ~120 lines)
> and cleaner (IMHO). And the autodeleting feature of the temporary
> files is just 3 extra lines.

There's nothing wrong in submitting a patch file that is longer than the 
original code.  Nobody gets excited by long patch files.  They are 
applied by running a program which doesn't care how long the input is.

Preserving as much of the original code as possible makes the probability 
of new bugs smaller and helps others to compare the two versions and see 
clearly what's been changed.  IMHO, this is much more important than 
saving some net bandwidth.

> Yeah, that is my problem. If DOS has all the data in its internal
> buffer, why it doesn't show them to the newly opened file? Is it a
> feature?

Because you redirected the handle to another file.  You should cause DOS 
to flush its buffers *before* the redirection, since you don't want the 
data to end up in the wrong place.

- Raw text -


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