This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sendmsg problems


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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

AltStyle によって変換されたページ (->オリジナル) /