When I was googling for this it was quite to hard to find so I thought I'd share. /proc/mounts doesn't publish a stream of events or something like that, the trick is to put the file in the "exceptfds" field. A "special exception" is triggered when it's updated and you can read it from scratch.
f = open("/proc/mounts")
r,w,x = select.select(,,[f])
Of course this can be combined with select/epoll on other fds if you actually look at the return value. :-)Share on Twitter Share on Facebook
I've started to use Ceedling for unittesting in embedded projects, really powerful! Good intro at… https://t.co/lrAtw8ckct
1 week, 1 day ago
QEMU/KVM with 3D accelerated desktop on Ubuntu https://t.co/LakPVT1oGa
1 week, 2 days ago