From: Matt Armstrong Date: 2002-01-19T05:35:08+09:00 Subject: Re: [RCR] #59 Add fsync method to IO class matz@ruby-lang.org (Yukihiro Matsumoto) writes: > We have to make up consensus about fdatasync. Choose one: > > (1) fsync and fdatasync; NOP if not exist > (2) fsync and fdatasync; error if not exist > (3) fsync only; NOP if not exist > (4) fsync only; error if not exist > (5) we don't need both > > I won't vote for 5; maybe I'm going to vote for 4. I vote 4 (2 is my second choice). Why? ...fsync is widely available, fdatasync is not as common. ...performance difference between fsync and fdatasync is probably not important for Ruby scripts. ...applications that use fsync consider it important and want to know when it does not exist on the platform. Are we agreed that the implementation of File#fsync will flush all data to the OS (like File#flush) before calling fsync()? -- matt