Move handle_signal to EventLoop code