From owner-freebsd-bugs Tue Sep 16 01:12:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA06630 for bugs-outgoing; Tue, 16 Sep 1997 01:12:06 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA05619; Tue, 16 Sep 1997 01:07:59 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id SAA24027; Tue, 16 Sep 1997 18:04:37 +1000 Date: Tue, 16 Sep 1997 18:04:37 +1000 From: Bruce Evans Message-Id: <199709160804.SAA24027@godzilla.zeta.org.au> To: bde@zeta.org.au, j@uriah.heep.sax.de Subject: Re: kern/4550 Cc: davidg@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, ortmann@sparc.isl.net Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> >Synopsis: /proc/curproc/{mem,status} are 0 size >> >... >> >The size is intentionally 0. >> >> The bug is that "regular" files are irregular. > >You mean, it should better display as: > >i-w------- 1 root wheel ctl >ir--r--r-- 1 root wheel etype I mean, so that little things like stdio can work. Bruce >From fseek.c: /* * Can only optimise if: * reading (and not reading-and-writing); * not unbuffered; and * this is a `regular' Unix file (and hence seekfn==__sseek). [and regular files are actually regular] * We must check __NBF first, because it is possible to have __NBF * and __SOPT both set. */ if (fp->_bf._base == NULL) __smakebuf(fp); if (fp->_flags & (__SWR | __SRW | __SNBF | __SNPT)) goto dumb; if ((fp->_flags & __SOPT) == 0) { if (seekfn != __sseek || fp->_file < 0 || fstat(fp->_file, &st) || (st.st_mode & S_IFMT) != S_IFREG) { fp->_flags |= __SNPT; goto dumb; } fp->_blksize = st.st_blksize; fp->_flags |= __SOPT; }