Date: Tue, 16 Sep 1997 18:04:37 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, j@uriah.heep.sax.de Cc: davidg@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, ortmann@sparc.isl.net Subject: Re: kern/4550 Message-ID: <199709160804.SAA24027@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> >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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709160804.SAA24027>