Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!goanna.cs.rmit.edu.au!news.apana.org.au!cantor.edge.net.au!news.teragen.com.au!news.access.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!newsfeeds.sol.net!worldnet.att.net!howland.erols.net!rill.news.pipex.net!pipex!blackbush.xlink.net!ka.sub.net!rz.uni-karlsruhe.de!not-for-mail From: uk1o@rzstud2.rz.uni-karlsruhe.de (Felix Schroeter) Newsgroups: comp.unix.bsd.misc,comp.os.linux.misc Subject: Re: Linux vs BSD Date: 25 Mar 1997 02:31:44 +0100 Organization: University of Karlsruhe, Germany Lines: 28 Message-ID: <5h79u0$meg@rzstud2.rz.uni-karlsruhe.de> References: <32DFFEAB.7704@usa.net> <5gjsc9$2cm@innocence.interface-business.de> <5gmk83$c9j@rzstud2.rz.uni-karlsruhe.de> <5h5og3$6qn@innocence.interface-business.de> NNTP-Posting-Host: rzstud2.rz.uni-karlsruhe.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Xref: euryale.cc.adfa.oz.au comp.unix.bsd.misc:2912 comp.os.linux.misc:167219 Hello! In article <5h5og3$6qn@innocence.interface-business.de>, J Wunsch <joerg_wunsch@interface-business.de> wrote: >uk1o@rzstud2.rz.uni-karlsruhe.de (Felix Schroeter) wrote: >[...] >> Another approach (which should work >> *everywhere*) is to write the data, then fsync() the fd, the close it. >> fsync() is specified to block until the data and all metadata are >> written to disk. (Perhaps it can even report errors!) >I don't think this is portable either. It's just like with sync(2), >it _initiates_ the writeback, but doesn't wait for completion. I >might be wrong about this, but that's what my man page says. Note >that it is silent about completion status. >DESCRIPTION > Fsync() causes all modified data and attributes of fd to be moved to a > permanent storage device. This normally results in all in-core modified > copies of buffers for the associated file to be written to a disk. If I remember correctly (but I may be wrong too), POSIX.1 requires fsync() to actually write all data and metadata to permanent storage before returning. Regards, Felix.