Re: linux recvfrom differencies

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 9 Apr 1999 13:21:24 +0100 (BST)


> back) linux returns -1 for next recvfrom with herrno(?) set to REFUSED,
> while BSD/Solaris just ignore this.
>
> The question is:
> is there any paper/RFC/FYI which puts a standard on such things, or this is
> basically `the matter of taste' of OS developers, and thus just should being
> watched carefully, while developing multi-platform applications?

RFC1122 requires that icmp errors get back to the application. POSIX 1003.1g
was written by people who didn't read the RFC. Now that 1003.1g is basically
completed we finally have scope for a spec that means something.

Linux quite intentionally has

#ifdef SO_BSDCOMPAT
int one=1;
setsockopt(socket_fd, SOL_SOCKET, SO_BSDCOMPAT, &one, sizeof(one));
#endif

so you can force the relevant BSDisms. Unfortunately despite repeated requests
to the glibc team it appears this is _still_ not being set by glibc when
you compile with -D__BSD_SOURCE.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/