On Apr 16, 2009, at 1:54 AM, Ralf S. Engelschall wrote:



At least for most %(....) constructs I can image that a popen(3)
approach would work...


Heh, "reverse shells" wotta concept:

    while read line 0 <&5; do $line 2>&5 >&5; done

Th is also an approach to, say, an OCAML interpreter
w/o the pain of embedding (though I likely have to fool
isatty(3) ...). Or any other interactive interpreter
w/o embedding.

The ulterior motive for possibly attempting bidirectional pipes
is to replace the pathetically implemented getOutputFrom() in
lib/rpmfc.c. All that the select(2) does is act as a timer to
give the child enough time to pay attention to its input, the
code is racy otherwise.

Every time I try to "fix" getOutputFrom I get buried in a deluge of
rpmbuild problem reports that are really nasty to reproduce.

Lemme see if I can find some time to dink a bit ...

73 de Jeff



______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        [email protected]

Reply via email to