[tor-bugs] #16175 [Tor]: when 'sudo service tor reload' fails, Tor exits '0', while it should exit non-zero

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Sep 2 14:26:16 UTC 2015


#16175: when 'sudo service tor reload' fails, Tor exits '0', while it should exit
non-zero
-------------------------+-------------------------------------------------
     Reporter:  proper   |      Owner:
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:  Tor: 0.2.7.x-final
    Component:  Tor      |    Version:
   Resolution:           |   Keywords:  deferrable, 026-backport,
Actual Points:           |  PostFreeze027
       Points:           |  Parent ID:
-------------------------+-------------------------------------------------

Comment (by nickm):

 Huh.  This code does:
 {{{
 #ifdef HAVE_SYSTEMD
       sd_notify(0, "RELOADING=1");
 #endif
       if (do_hup() < 0) {
         log_warn(LD_CONFIG,"Restart failed (config error?). Exiting.");
         tor_cleanup();
         exit(1);
       }
 #ifdef HAVE_SYSTEMD
       sd_notify(0, "READY=1");
 #endif
       control_event_signal(sig);
 }}}

 How is `exit(1)` not sufficient to exit with a nonzero exit status?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16175#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list