From owner-freebsd-hackers@freebsd.org Sun Aug 2 11:32:04 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 279879B17DD for ; Sun, 2 Aug 2015 11:32:04 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (m.saper.info [IPv6:2a01:4f8:a0:7383::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "m.saper.info", Issuer "Marcin Cieslak 2011" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B663B1A34 for ; Sun, 2 Aug 2015 11:32:03 +0000 (UTC) (envelope-from saper@saper.info) Received: from m.saper.info (saper@m.saper.info [IPv6:2a01:4f8:a0:7383::]) by m.saper.info (8.14.9/8.14.9) with ESMTP id t72BVxMH029324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 2 Aug 2015 11:31:59 GMT (envelope-from saper@saper.info) Received: from localhost (saper@localhost) by m.saper.info (8.14.9/8.14.9/Submit) with ESMTP id t72BVxVl029262; Sun, 2 Aug 2015 11:31:59 GMT (envelope-from saper@saper.info) X-Authentication-Warning: m.saper.info: saper owned process doing -bs Date: Sun, 2 Aug 2015 11:31:59 +0000 From: Marcin Cieslak To: John-Mark Gurney cc: Jordan Hubbard , "freebsd-hackers@freebsd.org" , Patrick Mooney Subject: Re: Interpretation of POSIX.1-2008 for recvmsg In-Reply-To: <20150802034945.GN78154@funkthat.com> Message-ID: References: <20150802000945.GL78154@funkthat.com> <476D3B86-896E-4049-8006-ADF964C7ECC3@icloud.com> <20150802034945.GN78154@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2015 11:32:04 -0000 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