improved detection of changes in dev/shm