delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/09/23/09:54:04

From: molnarl AT cdata DOT tvnet DOT hu
Date: Tue, 23 Sep 1997 15:52:36 +0200 (MET DST)
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: a little popen patch
In-Reply-To: <Pine.SUN.3.91.970923141913.15252C-100000@is>
Message-ID: <Pine.SOL.3.95.970923154851.3037A-100000@dumballah.tvnet.hu>
MIME-Version: 1.0


On Tue, 23 Sep 1997, Eli Zaretskii wrote:

> 
> This change eliminates the code that adds a new node to the linked list. 
> That list holds information from previous calls to `popen' that didn't
> have a corresponding `pclose' yet.  So, if a program calls `popen' twice
> (or more) in a row, the second call overwrites the info of the first.  Bad
> idea...
> 
> Or did I miss something?
> 
> On Tue, 23 Sep 1997, Molnar Laszlo wrote:
> > --- 90,95 ----
> >     /* if empty list - just grab new node */
> >     if (!pl)
> > !     l1->next = pl;
> > !   pl = l1;
> >   
> >     /* stick in elements we know already */

This works. It adds the new node to the beginning of the list, not to the
end.

Laszlo


- Raw text -


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