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: PATCH to support native Windows builds


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.


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