Subject: Re: kern/2428: socketpair() fails if fd0 open
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 05/18/1996 13:01:05
right.  it returns an undefined value, but not the error value.
i guess you can can that undefined is an error condition ... but
not necessarily failure of the syscall.

to work around these problems, i almost always use

if (systemcall(...) < 0) {

in my code -- except for one rare case i can't recall right now,
this has worked everywhere for me.

.mrg.

ps:  note that i'm not saying _don't_ fix socketpair or its man
page.