[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpm-devel
Subject:    Re: Embedding bash/rc in RPM-5.2
From:       Jeff Johnson <n3npq () mac ! com>
Date:       2009-04-16 12:22:18
Message-ID: 119C0E9D-5809-4361-88F7-A290C79027E8 () mac ! com
[Download RAW message or body]


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                        rpm-devel@rpm5.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic