passing file descriptors through stream pipes?

passing file descriptors through stream pipes?

Post by Stryd » Sat, 21 Jan 1995 09:45:19



I'm using W. Richard Stevens's book "Advanced Programming in the Unix
Environment" to explore Linux.  So far, everything that's been covered
has been compilable on my Linux system.

However, I'm working on his example of an open server - a server that
opens files, sockets, etc. for it's clients.  He gives three different
ways of passing file descriptors between processes using stream pipes.
Unfortunately, none of these have worked - the Berkeley implemintations
require a data structure called "struct msghdr" that's supposed to be
in socket.h, but ain't there.  The SVR4 implementation is done with an
I_SENDFD parameter to ioctl, but there's no such animal on my Linux
system.

Any help in this matter would be greatly appreciated.


_________________________________________________________________________

                        Imagine there's no heaven.
                        It's easy if you try.
                        No hell below us,
                        And above us only sky.

                                       John Lennon
_________________________________________________________________________

 
 
 

1. passing file descriptors through stream pipes?

I'm working with W. Richard Sevens's book "Advanced Programming in the
Unix Environment".  Currently I'm working with a sample application he
calls an "open server".  In it, one process passes an opened file
descriptor to another process.

He shows three examples of how to do it on SVR4, 4.3BSD and 4.3+BSD
implementations of Unix, none of which will compile on my Linux system.

Can this be done?  I'll supply more detail if needed.


2. Things I don't get...

3. How to pass control data to other process thru stream pipes

4. HELP!!! Windows flashing when mouse moves around?

5. Passing file descriptors thru rexec() socket

6. Newbie sendmail configuration

7. file descriptor passing via streams ioctl (AIX 4.3)

8. XDM login question

9. Fast way to write a file to a file descriptor or stream?

10. Named Pipes and FILE vs file descriptors

11. Passing a var thru a file