NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/45564: 2nd socket created by socketpair(2) is not connected to 1st socket.



The following reply was made to PR lib/45564; it has been noted by GNATS.

From: Matthew Mondor <mm_lists%pulsar-zone.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: lib/45564: 2nd socket created by socketpair(2) is not connected
 to 1st socket.
Date: Fri, 4 Nov 2011 12:59:48 -0400

 On Thu,  3 Nov 2011 18:05:00 +0000 (UTC)
 naruse%airemix.jp@localhost wrote:
 
 > getpeername: Socket is not connected
 
 Does this still happen if you remove SOCK_CLOEXEC from the protocol
 argument to socketpair(2)?  If it no longer occurs without the
 SOCK_CLOEXEC, fcntl(2) could be used to later enable close-on-exec
 instead.
 
 If removing SOCK_CLOEXEC doesn't help, do write/read work while
 getpeername fails (it seems odd to me to call getpeername(2) on a
 socketpair)?
 
 I tested this under NetBSD-5 where it does work however, if I take out
 the SOCK_CLOEXEC (I unfortunately cannot test it on -current right now).
 
 Thanks,
 -- 
 Matt
 


Home | Main Index | Thread Index | Old Index