Re: Question about I_SENDFD

From: Alexander Viro (viro@math.psu.edu)
Date: Thu Sep 07 2000 - 05:02:00 EST


On Thu, 7 Sep 2000, Andrey G. Kaplanov wrote:

> Respected colleagues!
> In advanced Unix systems, including SCO UnixWare, SUN OS
> there is a facility of transmission of descriptor of openning file
> through stream, by means of the command ioctl I_SENDFD.

        Linux has no streams. It's Missed'em'Vism and it's not supported.
Use sockets.

> For instance, following command writes transDsc descriptor to the stream streamDsc.
> int ret = ioctl(streamDsc, I_SENDFD, transDsc);
> On Red Hat Linux kernel 2.2.16 ret is -1, errno is 22 - Invalid argument.
> That is here done not so, or be other ways of transmission of file descriptor between processes?

        Same as on every sane UNIX system. sendmsg() on AF_UNIX socket with
SCM_RIGHTS cookie.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:29 EST