sendmsg problems
David E Euresti
davie@MIT.EDU
Mon Mar 18 12:21:00 GMT 2002
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/
More information about the Cygwin
mailing list