From: Leslie Henlsey Date: 2002-01-18T01:17:03+09:00 Subject: Re: [RCR] #59 Add fsync method to IO class Steve Lumos wrote: > > DESCRIPTION > The fdatasync() function forces all currently queued I/O > operations associated with the file indicated by file > descriptor fildes to the synchronized I/O completion state. > > The functionality is as described for fsync(3C) (with the > symbol _XOPEN_REALTIME defined), with the exception that all > I/O operations are completed as defined for synchronised I/O > data integrity completion. > > and that sounds to me like it should be rb_notimplemented if it's not > defined instead of passed-off to fsync() (let the Ruby code decide to > use fsync() instead if that's really good enough. I was following Linux's lead on this. But now that you mention it, having fdatasync silently call fsync does seem like a bad idea :) > Also, the whole point of these functions is to get the file in a known > state. If they fail then the file probably isn't in the known state > which means that the return value should be checked and rb_sys_fail() > on error IMO. I agree. I will make this change to the patch. > > Steve > Leslie pretsel on #ruby-lang