Re: STREAMS pipes - ioctl I_SENDFD
- From: Michael Kerrisk <michael.kerrisk.at.gmx.net@xxxxxxxxxx>
- Date: Thu, 29 Mar 2007 06:26:24 +0200
On Wed, 28 Mar 2007 21:30:38 +0200, Hallvard B Furuseth
<h.b.furuseth@xxxxxxxxxxx> wrote:
How do I send a file descriptor over a pipe with ioctl I_SENDFD?
Reading up on "STREAMS", I see the pipe must be a "STREAMS" file
descriptor, but I'm not sure what a "stream" is in that context -
is a pipe one, or must one do some magic to turn it into one?
The following program works on Solaris, but on Linux, OSF1 and HP
the ioctls say "Invalid argument" or "Not a typewriter":
Linux doesn't have STREAMS, which are the System V way of doing this
task. BSD defined a different mechanism using sockets and the
SCM_RIGHTS message type with snedmsg() and recvmsg(), and this method
is more or less standardised in POSIX.1-2001.
Cheers,
Michael
.
- Follow-Ups:
- Re: STREAMS pipes - ioctl I_SENDFD
- From: Hallvard B Furuseth
- Re: STREAMS pipes - ioctl I_SENDFD
- References:
- STREAMS pipes - ioctl I_SENDFD
- From: Hallvard B Furuseth
- STREAMS pipes - ioctl I_SENDFD
- Prev by Date: Re: recv() sends extra garbage bytes
- Next by Date: Re: linking problem
- Previous by thread: STREAMS pipes - ioctl I_SENDFD
- Next by thread: Re: STREAMS pipes - ioctl I_SENDFD
- Index(es):
Relevant Pages
|
|