re-order initializations and exit on version display
add read from inotifyfd
make signalfd nonblocking and patch signal handlers