Simplify poll loop and exit poll on SIGHUP