Subject: Re: kern/2428: socketpair() fails if fd0 open
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: J.T. Conklin <jconklin@netcom.com>
List: netbsd-bugs
Date: 05/17/1996 18:13:40
> The bug is not what you think it is; socketpair() is actually
> succeeding. The bug is, socketpair is returning one of the new file
> descriptors as its return value, rather than the 0 it's documented to
> return, when it succeeds.
> Alternatively, one can look upon this as a bug in the manpage, in that
> it incorrectly documents the return value.
I think the code should be fixed. XPG4.2 states:
RETURN VALUE
Upon successful completion, this function returns 0.
Otherwise, -1 is returned and errno is set to indicate the
error.
Isn't on line documentation great :-)
--jtc