David Rowley <dgrowleyml@gmail.com> writes:
> ... I can't glean too much from the
> socket() documentation for either OS about what the return value is.
> I didn't see anything which indicated anything about how the return
> value is determined.
BTW, as far as that goes, POSIX is perfectly clear about this:
2.14. File Descriptor Allocation
All functions that open one or more file descriptors shall, unless
specified otherwise, atomically allocate the lowest numbered available
(that is, not already open in the calling process) file descriptor at
the time of each allocation.
It doesn't surprise me a lot to hear that Microsoft couldn't be
bothered to adhere to the spec, though.
regards, tom lane