Interpretation of POSIX.1-2008 for recvmsg

Marcin Cieslak saper at saper.info
Sun Aug 2 11:32:04 UTC 2015


On Sat, 1 Aug 2015, John-Mark Gurney wrote:

> Jordan Hubbard wrote this message on Sat, Aug 01, 2015 at 18:10 -0700:
> > One obvious approach might be to run Patrick's test case on a OS X system, since it's one of the very few remaining (still living) UNIX??? platforms that has to pass the official (and really large) Unix Conformance test suite.  Whatever OS X's behavior is, arguably right or wrong, you'll at least know that TOG signed off on it.
> 
> Ok, I know it's a bit old, but MacOSX 10.7.5:
> $./peektest 
> peek len: 0 errno: 0 flags: 12
> recv len: 20 errno: 0 flags: 0
> 
> and NetBSD 6.1.5:
> # ./peektest
> peek len: 0 errno: 0 flags: 12
> recv len: 20 errno: 0 flags: 0
> 
> and OpenBSD 5.7:
> # ./peektest                                                                   
> peek len: 0 errno: 0 flags: 12
> recv len: 20 errno: 0 flags: 0

The results are correct: the peektest.c tries
to use a Linux-only extension to recvmsg()
- giving MSG_PEEK | MSG_TRUNC as the input flag.

~Marcin


More information about the freebsd-hackers mailing list