I\'m doing mmap() on a file that can be unmounted ( the file is located on an USB device which the user can remove at any time ), and my application crashes if the file is u
you can get notification about any change on file(s), dir(s) by using http://linux.die.net/man/7/inotify. you may consider using IN_DELETE.