From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 5 05:38:19 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40602132 for ; Thu, 5 Feb 2015 05:38:19 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA11A04 for ; Thu, 5 Feb 2015 05:38:19 +0000 (UTC) Received: from u10-2-32-011.office.norse-data.com (unknown [50.204.88.51]) by elvis.mu.org (Postfix) with ESMTPSA id 238F4341F8AD for ; Wed, 4 Feb 2015 21:38:12 -0800 (PST) Message-ID: <54D301EB.5010107@mu.org> Date: Wed, 04 Feb 2015 21:38:51 -0800 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: SOL_SOCKET References: <1897206085.18211845.1423091655890.JavaMail.zimbra@comcast.net> In-Reply-To: <1897206085.18211845.1423091655890.JavaMail.zimbra@comcast.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2015 05:38:19 -0000 On 2/4/15 3:14 PM, rondzierwa@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@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