This is the mail archive of the
mailing list for the GCC project.
Re: PATCH to support native Windows builds
- From: DJ Delorie <dj at redhat dot com>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 Jun 2004 17:36:22 -0400
- Subject: Re: PATCH to support native Windows builds
- References: <200406112059.i5BKxnWv025590@sirius.codesourcery.com>
My original argument against it wasn't that it used pipes, but that it
added a platform-specific API to libiberty. Since the purpose of
libiberty is to provide platform independence, that code just doesn't
belong in libiberty. It is an invalid abstraction for libiberty, and
that is the key to my objection.
DOS is not the reason for my objection, just an example.
>From what I recall of the topic, what you're really looking for is a
popen() equivalent without the shell tokenizing nightmare, right? If
so, we just need to design an abstraction for WHAT you're trying to do
(run a command with redirected I/O), not HOW you're trying to do it
(pipe/fork/exec). IIRC two alternate APIs were offered, we can
certainly try again, if first we can agree on a suitable abstraction
(what you're trying to do, vs how to do it). Since pexecute already
knows how to pipe commands together, extending it to support I/O
attached to either end shouldn't be *that* hard.