Re: st_dev and st_ino for pipes

看板FB_current作者時間14年前 (2011/10/05 21:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串5/5 (看更多)
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 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1EZ5KFBD (FB_current)
文章代碼(AID): #1EZ5KFBD (FB_current)