Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Oct 2011 08:29:10 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Kostik Belousov <kostikbel@gmail.com>, standards@freebsd.org, current@freebsd.org
Subject:   Re: st_dev and st_ino for pipes
Message-ID:  <201110050829.10439.jhb@freebsd.org>
In-Reply-To: <20111002220405.GN1511@deviant.kiev.zoral.com.ua>
References:  <20111002220405.GN1511@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110050829.10439.jhb>