ruby-changes:58220
From: Nobuyoshi <ko1@a...>
Date: Sat, 12 Oct 2019 15:02:22 +0900 (JST)
Subject: [ruby-changes:58220] 6333020fc9 (master): atime may not updated unless strictatime is set on macOS Catalina
https://git.ruby-lang.org/ruby.git/commit/?id=6333020fc9 From 6333020fc924d3ae63775c032bbe8f57364cd42e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 12 Oct 2019 14:55:55 +0900 Subject: atime may not updated unless strictatime is set on macOS Catalina Cited from mount(8): ``` strictatime Always update the file access time when reading from a file. Without this option the filesystem may default to a less strict update mode, where some access time updates are skipped for performance reasons. This option could be ignored if it is not supported by the filesystem. ``` diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c index c9c3473..63d2356 100644 --- a/ext/-test-/file/fs.c +++ b/ext/-test-/file/fs.c @@ -89,6 +89,9 @@ get_noatime_p(VALUE self, VALUE str) https://github.com/ruby/ruby/blob/trunk/ext/-test-/file/fs.c#L89 rb_sys_fail_str(str); } # ifdef HAVE_STRUCT_STATFS_F_FLAGS +# ifdef MNT_STRICTATIME + if (!(st.f_flags & MNT_STRICTATIME)) return Qtrue; +# endif # ifdef MNT_NOATIME return st.f_flags & MNT_NOATIME ? Qtrue : Qfalse; # elif defined(ST_NOATIME) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/