This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cs] pipe infrastructure support


Ian Lance Taylor <ian@wasabisystems.com> writes:

> "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()

This is an interesting suggestion, I'll look into it.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]