SOL_SOCKET

Alfred Perlstein bright at mu.org
Thu Feb 5 05:38:19 UTC 2015


On 2/4/15 3:14 PM, rondzierwa at comcast.net wrote:
> Is SOL_SOCKET broken in 9.3-release?

Not that I am aware of.
>
> I have an app i'm porting from linux that consists of two programs, one is run as a command from ssh ( ssh user at host -T ./receiver ). The receiver program then passes its stdin and stdout fd's to a server program using through a unix socket in /tmp.
>
> When recompile to run on FreeBSD, the fd for stdin that i send over does not get translated - i.e. the fd i get from recvmsg in the server process is 0, which is the server's own stdin, not the stdin of the program that sent the fd. The stdout fd gets passed successfully. its only the stdin fd that isn't getting translated.
>
> I have tried doing a dup() on the fds before sending them, and the stdin fd still turns up as 0 at the other end.
>
> Is there something I have to do in order to send my stdin fd to another process?
>
> thanks,
> ron.
>
You'll need to give some example code for anyone to help.

-Alfred




More information about the freebsd-hackers mailing list