Remove the single-threaded kqueue stuff and use a separate thread to handle signals instead.