SOL_SOCKET

rondzierwa at comcast.net rondzierwa at comcast.net
Wed Feb 4 23:14:19 UTC 2015


Is SOL_SOCKET broken in 9.3-release? 

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. 




More information about the freebsd-hackers mailing list