Mail Archives: djgpp-workers/1997/11/25/07:26:58
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 -