Only enable console logging via the service layer (when no services
authorDavin McCall <davmac@davmac.org>
Sat, 16 Jan 2016 14:45:52 +0000 (14:45 +0000)
committerDavin McCall <davmac@davmac.org>
Sat, 16 Jan 2016 14:45:52 +0000 (14:45 +0000)
are using the console).

src/control.cc
src/dinit.cc

index 3488b859c29051896584ad93caf5046316583693..30dd3166d1445d5f797c84cbdf5dc638a2490591 100644 (file)
@@ -41,7 +41,6 @@ void ControlConn::processPacket()
         auto sd_type = static_cast<ShutdownType>(rbuf[1]);
         
         service_set->stop_all_services(sd_type);
-        enable_console_log(true);
         char ackBuf[] = { DINIT_RP_ACK };
         if (! queuePacket(ackBuf, 1)) return;
         
index 9e59dd44bac3d217924f98288334a9f9013b05b8..311c05fd610fccbf2b06eff65f80fab8668b01c8 100644 (file)
@@ -458,7 +458,6 @@ void close_control_socket(struct ev_loop *loop) noexcept
 /* handle SIGINT signal (generated by kernel when ctrl+alt+del pressed) */
 static void sigint_reboot_cb(struct ev_loop *loop, ev_signal *w, int revents)
 {
-    enable_console_log(true);
     service_set->stop_all_services(ShutdownType::REBOOT);
 }
 
@@ -476,6 +475,5 @@ static void sigquit_cb(struct ev_loop *loop, ev_signal *w, int revents)
 /* handle SIGTERM/SIGQUIT - stop all services (not used for system daemon) */
 static void sigterm_cb(struct ev_loop *loop, ev_signal *w, int revents)
 {
-    enable_console_log(true);
     service_set->stop_all_services();
 }