After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755052 - g_unix_mounts_get() doesn't update timestamp
g_unix_mounts_get() doesn't update timestamp
Status: RESOLVED DUPLICATE of bug 787731
Product: glib
Classification: Platform
Component: gio
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
Depends on:
Reported: 2015-09-15 11:01 UTC by Ondrej Holy
Modified: 2017-09-18 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---

test program (906 bytes, text/plain)
2015-09-15 11:01 UTC, Ondrej Holy
gunixmounts: Fix timestamp for /proc/ files (2.14 KB, patch)
2016-09-27 11:21 UTC, Ondrej Holy
none Details | Review

Description Ondrej Holy 2015-09-15 11:01:10 UTC
Created attachment 311348 [details]
test program

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...
Comment 1 Ondrej Holy 2016-09-27 11:21:41 UTC
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.
Comment 2 Ondrej Holy 2017-09-18 08:49:08 UTC

*** This bug has been marked as a duplicate of bug 787731 ***