Date: Sat, 19 Jun 2004 14:59:39 +0400 From: Andrey Chernov <ache@nagual.pp.ru> To: freebsd-arch@freebsd.org Subject: Re: fflush() on readonly files Message-ID: <20040619105938.GA69596@nagual.pp.ru> In-Reply-To: <20040619095642.GA67130@sanatana.dharma> References: <20040609154040.GA26229@asura.bsd> <20040610021356.GA4990@VARK.homeunix.com> <20040610025439.GA11655@cat.robbins.dropbear.id.au> <20040619095642.GA67130@sanatana.dharma>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 19, 2004 at 11:56:43AM +0200, Radim Kolar wrote: > Today I have stepped on another example: advancecomp (in ports): > 543 * Get the size of the file. > 544 */ > 545 long fzsize(adv_fz* f) > 546 { > 547 if (f->type == fz_file) { > 548 struct stat st; > 549 if (fflush(f->f) != 0) { > 550 return -1; > 551 } This program relies on undocumented behaviour and should be fixed in anycase. Besides of that the only reasonable approach we can take is to do what majority of systems does here. Since you are interested in the subject, please post specific table for all main systems in the form like: System readonly fflush() behaviour -- Andrey Chernov | http://ache.pp.ru/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040619105938.GA69596>