[cs] pipe infrastructure support

Ian Lance Taylor ian@wasabisystems.com
Wed Sep 24 23:42:00 GMT 2003


"Zack Weinberg" <zack@codesourcery.com> writes:

> > Since collect just needs popen, why not write a portable popen
> > function and put that in libiberty, instead of trying to reuse
> > pexecute which is really intended for different purposes?  Then use
> > the new popen function for collect_execute.  Naturally popen and
> > pexecute would share some common subroutines.
> 
> Umm. If you look at my patch carefully, you will see that that is
> exactly what it does.  It may be hard to tell because I tried to make
> the pexecute API a bit nicer at the same time.

Well, I have to look very carefully indeed, because I see functions
like pmkpipe(), which actually calls pipe() on Unix.  That function
would be hard to write on DOS.  Sure, you can work it out so that it
works under certain restrictions, but that's not what I am suggesting.
I'm really suggesting writing something like

FILE *pex_read_program_output(program, argv, flags)
void pex_close()

Ian



More information about the Gcc-patches mailing list