Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
Subject: Re: File descriptor equivalent of fflush?
Date: 1996/01/29	[thread overview]
Message-ID: <4ejceeINN5v3@keats.ugrad.cs.ubc.ca> (raw)
In-Reply-To: DLxHsx.7Ko@un.seqeb.gov.au

In article <DLxHsx.7Ko@un.seqeb.gov.au>,
Anthony Lee <al012@svtstu.seqeb.gov.au> wrote:
>Dear all,
>
>I am trying to find an equivalent of fflush for file descriptors
>in ULTRIX and OSF.  

All you can do is open the file with the O_SYNC flag. If the underlying file
system supports it, the write() calls will exit only when the blocks affected
by write() have been committed to disk.

You can also call fsync() on the file descriptor, which will cause all the
unwritten cache blocks belonging to that file to be queued for writing, though
I'm not sure whether fsync() will wait for the writing to take place. 

>-- 
>Anthony Lee        These are my opinions and not SEQEB.
>SEQEB                                            
>150 Charlotte Street                   ..--  __o 
>Brisbane                          ....--   _ \<,_               
>Qld 4000                         ____     (_)/ (_)                       
>Australia
>voice:+61 7 3407 4541            Death to the Daleks!!!!
>fax:  +61 7 3407 4607
>email: AL012@svtstu.seqeb.gov.au
>


-- 




  parent reply	other threads:[~1996-01-29  5:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-01-29  5:00 File descriptor equivalent of fflush? Anthony Lee
1996-01-29  5:00 ` ua302aa
1996-01-30  5:00   ` John Hascall
1996-01-29  5:00 ` Kazimir Kylheku [this message]
1996-01-29  5:00 ` (Summary of response) " Anthony Lee
1996-01-30  5:00 ` Curt Smith
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox