Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 2015 23:14:15 +0000 (UTC)
From:      rondzierwa@comcast.net
To:        freebsd-hackers@freebsd.org
Subject:   SOL_SOCKET
Message-ID:  <1897206085.18211845.1423091655890.JavaMail.zimbra@comcast.net>
In-Reply-To: <180767922.18206802.1423091179515.JavaMail.zimbra@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help

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@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. 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1897206085.18211845.1423091655890.JavaMail.zimbra>