watch for inotify events in main select() loop

rather than watching in a separate thread