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
Jensen if you are reading this, fuck your GeForce Partner Program. https://t.co/8vOoiymSrO
3 days, 8 hours ago