[comp.unix.questions] Creating XDR Streams

bilbo@bisco.kodak.COM (Charles Tryon) (09/27/90)

We have an application running on two systems on a network where the first
process uses an rexec() call to start up the second process.  This call
gives me one file descriptor which, as I understand it, can be used to both
write to (goes to the stdin on the other process) and read from (comes from
the stdout on the other process) the second process.

Due to portability issues, I want to use XDR (eXternal Data Representation)
to transfer the data back and forth between the two proceses.  My question is
this:  Given the single file descriptor, how do I open two XDR streams (one
for ENCODE, one for DECODE) on the parent side?  Using SunOS 4.0.3 or 4.1, I
can use the xdrstdio_create() function on the child side to associate the two
streams with stdin/out.  I've been beating my head against the parent side
for some time now.  As normal, the Sun manuals are less than helpful in this
respect.  (*SIGH*)

Any ideas out there???

--
Chuck Tryon
    (PLEASE use this address, as Kodak foobars one in header!)
    <bilbo@bisco.kodak.com>
    USmail: 46 Post Ave.;Roch. NY 14619                       B. Baggins
    <<...include standard disclamer...>>                      At Your Service

     "Then again, squirrels could be stupid."   (D. Mocsny)