From owner-freebsd-current@FreeBSD.ORG Wed Oct 5 12:33:49 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9247C1065672; Wed, 5 Oct 2011 12:33:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0318FC14; Wed, 5 Oct 2011 12:33:49 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 20B3446B32; Wed, 5 Oct 2011 08:33:49 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A3CBE8A02E; Wed, 5 Oct 2011 08:33:48 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 5 Oct 2011 08:29:10 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <20111002220405.GN1511@deviant.kiev.zoral.com.ua> In-Reply-To: <20111002220405.GN1511@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201110050829.10439.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 05 Oct 2011 08:33:48 -0400 (EDT) Cc: Kostik Belousov , standards@freebsd.org, current@freebsd.org Subject: Re: st_dev and st_ino for pipes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2011 12:33:49 -0000 On Sunday, October 02, 2011 6:04:05 pm Kostik Belousov wrote: > Our implementation of pipes does not provide useful values for st_dev > and st_ino when stat(2) is done on an anonymous pipe. It was noted by the > people outside the project, e.g. Perl contains a workaround in one > of its modules, submitted by Debian/kFreeBSD developers, see > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537555 > and the commit 16f708c9bc0dc48713b200 in the Perl git. > > I think this is a non-conformance, since SUSv4 explicitely states > in the description of stat(2) > "For all other file types defined in this volume of POSIX.1-2008, the > structure members st_mode, st_ino, st_dev, st_uid, st_gid, st_atim, > st_ctim, and st_mtim shall have meaningful values ...". > > Patch below implements the requirement, by the cost of the small overhead > at the pipe creation time, and slightly bigger cost at the destruction. > > Any comments ? I think this is fine. -- John Baldwin