[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs