We get this tip from Woi, thank you very much.
Since kernel 2.6.13 inotify created by John McCutchan is included. On Debian install inotify-tools.
The package includes inotifywait and inotifywatch. Try follwing source:
inotifywait -q /dev/shm/inotest
The tool inotifywait wait until the file /dev/shm/inotest
will be changing.
Now you can put some stuff to test file:
echo hello > /dev/shm/inotest
You get as result from inotifywait:
/dev/shm/inotest MODIFY
There is a development package libinotifytools0-dev.
//It is nessesary inotifytools_initialize() while( int inotifytools_watch_file ( char const * filename, int events ) == 1 ) { }