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
We’re happy and proud to announce that we’re opening a new studio in Malmö, Sweden.
Say hello to IOI Malmö.
6 days, 10 hours ago
@sarvikas Finally! :-)
1 week, 6 days ago
Lägg ut! Lägg UT! LÄGG UT!!! https://t.co/TiZunp9rle
2 weeks, 1 day ago