on_sighup can throw exception.