GNOME Bugzilla – Bug 755052
g_unix_mounts_get() doesn't update timestamp
Last modified: 2017-09-18 08:49:08 UTC
Created attachment 311348 [details]
Steps to reproduce:
1/ build and run attached test program (tested on Fedora 23)
2/ mount e.g. some nfs share
3/ see output from test program
g_unix_mount_monitor realized the change and emitted mounts-changed signal, g_unix_mounts_get() returned also new unix mount, but timestamp is unchanged. So it isn't possible to check the changes using g_unix_mounts_changed_since() as it is suggested in documentation...
Created attachment 336350 [details] [review]
gunixmounts: Fix timestamp for /proc/ files
Stat is not realiable for /proc/ files. It seems that the first
stat call is cached currently. Consequently, g_unix_mounts_get
returns still the same timestamp regardless of mounts changes.
Use g_get_monotonic_time instead of stat as it is already used
for mount poller.
*** This bug has been marked as a duplicate of bug 787731 ***