ioctl workaround example for signal-driven inotify deficiencies