Re: [BUG] Passing FDs over pipes

Alex Belits (
Wed, 13 May 1998 21:11:20 -0700 (PDT)

On Thu, 14 May 1998, Richard Gooch wrote:

> Hi, all. With 2.1.97 I get "Socket operation on non-socket" when I
> use sendmsg(2) to transfer a FD over a pipe. Transferring over a Unix
> socket works fine.

This is exactly what it's supposed to do -- FD passing over
anonymous pipes is a side-effect in their implementations that are done
over socket code, not a standard BSD feature (as well as bidirectional
transfer over pipes).

FD passing probably, and bidirectional transfer definitely was possible
over pipes in 4.4BSD, however IMHO its derivatives (or at least FreeBSD)
lost that functionality when pipes support was optimized, and the same
thing can be expected in any system even if it isn't derived from 4.4BSD.
I don't know exactly what was changed when in FreeBSD and Linux because I
used pipes/sockets only how they were supposed to be used (judging by
what is in R. Stevens' UNP), however I know that there definitely were
similar things in 4.4BSD -> FreeBSD-2.x.x.


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to