def needs_restart(self, option_fingerprint):
    """
    Overrides ProcessManager.needs_restart, to account for the case where pantsd is running
    but we want to shutdown after this run.
    :param option_fingerprint: A fingeprint of the global bootstrap options.
    :return: True if the daemon needs to restart.
    """
    should_shutdown_after_run = self._bootstrap_options.for_global_scope().shutdown_pantsd_after_run
    return super(PantsDaemon, self).needs_restart(option_fingerprint) or \
           (self.is_alive() and should_shutdown_after_run)
Overrides ProcessManager.needs_restart, to account for the case where pantsd is running
    but we want to shutdown after this run.
    :param option_fingerprint: A fingeprint of the global bootstrap options.
    :return: True if the daemon needs to restart.