lkml.org 
[lkml]   [1996]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: imapd and synchronous writes
Hi,

On Tue, 19 Mar 1996 08:40:40 +0100, Ulrich Windl
<Ulrich.Windl@rz.uni-regensburg.de> said:

> On 18 Mar 96 at 18:11, sct@dcs.ed.ac.uk wrote:
>> Not true. {int fd = open(".", O_RDONLY, 0); int rc = fsync(fd); close(fd)}
> ^^^^^^ ^^^^^^^^
> Does it work? Syncing a file that's opened read-only?

Yes. fsync() flushes all data associated with an inode, regardless of
whether or not it was written under any particular file descriptor.
The write mode on the fd is irrelevant, and you cannot open a
directory for write anyway.

Cheers,
Stephen.
--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.



\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.042 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site