Bug 293914

Summary: Mtab change monitoring does not work
Product: [Frameworks and Libraries] solid Reporter: Stefan Brüns <stefan.bruens>
Component: libsolid-fstabAssignee: Mario Bensi <nef>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Stefan Brüns 2012-02-12 17:26:29 UTC
Version:           unspecified (using KDE 4.8.0) 
OS:                Linux

/etc/mtab points to /proc/self/mounts on Linux. As inotify only works for regular files, no changes are picked up.

/proc/[self/]mounts should be monitored with select(n, ..., ..., {mounts_fd, ...} ) on Linux



Reproducible: Didn't try

Steps to Reproduce:
Mount/umount a smb/cifs/nfs network share under Linux.

Actual Results:  
no signal emitted

Expected Results:  
emit mtabChanged

See https://git.reviewboard.kde.org/r/103954/
Comment 1 Mario Bensi 2012-02-28 15:24:50 UTC
Git commit b16cfec44104ded4a8959af4e790fe2f7d6d2745 by Mario Bensi.
Committed on 28/02/2012 at 16:22.
Pushed by bensi into branch 'KDE/4.8'.

Fix for mtab monitoring on Linux

Add a QSocketNotifier pointing to the mtab fd.

REVIEW: 103954
Related: bug 293926

M  +15   -1    solid/solid/backends/fstab/fstabwatcher.cpp
M  +4    -0    solid/solid/backends/fstab/fstabwatcher.h

http://commits.kde.org/kdelibs/b16cfec44104ded4a8959af4e790fe2f7d6d2745
Comment 2 Stefan Brüns 2012-09-27 10:13:20 UTC
Fixed in 4.8.4, 4.9