From owner-freebsd-hackers@freebsd.org Tue Aug 4 19:52:20 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 670CD9B37A2 for ; Tue, 4 Aug 2015 19:52:20 +0000 (UTC) (envelope-from patrick.mooney@joyent.com) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 367F8863 for ; Tue, 4 Aug 2015 19:52:19 +0000 (UTC) (envelope-from patrick.mooney@joyent.com) Received: by oip136 with SMTP id 136so8799964oip.1 for ; Tue, 04 Aug 2015 12:52:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=BeoEbB96V4uOJdmXeObMnqdM8Tp8r1fwh2UmPHu7+gg=; b=JHkJvVHPdwQlxNnFMwqsar8zfE+p+2oJ6u1YWcCi/yueHSGBXuOJIfQRB5EnddvZeT x8mFDh7HNlHwjtNZaCG4csZc74iM19O5/uiKJp11tbBO8Uukw2BgfeftqHy6L4R9dIyK PKWLoT8JbIFCrztxiaS1mMrkZWU8kJAIcFEX3FLypToozbANwDtvndsv/THYGGxRklJU rW1VTYBZt0PVjUeyyAC5qpy9pJhbFtpALwDNiqgmja62qMxx6J4SGMSEAE3qp0i/9I1K Yf56JSrWjqB+Z0hWfQitCM4AZHFpsdYf/ap3skW1wGMCjubgMi79Q3VRP4u/zgwoqBF/ VZow== X-Gm-Message-State: ALoCoQlnSvmW93/Nr64BQVPT/jO1O+6qbPmKtZ0I2r/89pG5Slpzj7ZE7Ph3lI2Rv/xGUpxOB6wX MIME-Version: 1.0 X-Received: by 10.202.219.195 with SMTP id s186mr4286103oig.25.1438717932983; Tue, 04 Aug 2015 12:52:12 -0700 (PDT) Received: by 10.202.206.17 with HTTP; Tue, 4 Aug 2015 12:52:12 -0700 (PDT) In-Reply-To: References: <20150802000945.GL78154@funkthat.com> <476D3B86-896E-4049-8006-ADF964C7ECC3@icloud.com> <20150802034945.GN78154@funkthat.com> Date: Tue, 4 Aug 2015 14:52:12 -0500 Message-ID: Subject: Re: Interpretation of POSIX.1-2008 for recvmsg From: Patrick Mooney To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Tue, 04 Aug 2015 19:52:20 -0000 OK. It seems clear, given the consensus in behavior across the BSDs as well as OSX. We'll find a separate way to enable the Linux-y behavior in our emulation. Thanks for your time. On 2 August 2015 at 06:31, Marcin Cieslak wrote: > 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 sys= tem, since it's one of the very few remaining (still living) UNIX??? platfo= rms 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 lea= st 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