Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 18 Mar 2002 13:46:12 -0500 (EST) From: David E Euresti To: Subject: sendmsg problems Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII So I'm trying to work out a way to have socket passing using DuplicateHandle. Unfortunately I don't think that sendmsg works correctly. I use socketpair to create a pair of connected Unix Domain sockets. Then I fork. Then I create a socket which I want to pass to the child. But when I call sendmsg on the original socketpair thing it returns -1, a Bad Address. I don't set msg_name in the msghdr because the socket is already connected. So I went into the sources and sure enough sendmsg is implemented by calling sendto using the msg_name that's being passed, and since message name is null the call dies. I know that calling sendmsg, on a socketpair after a fork, with no name works on Unix. Is there any way around this? Thanks, David Euresti -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/