Guard use of inittab_id/_line with #if USE_UTMPX.
authorDavin McCall <davmac@davmac.org>
Tue, 30 Apr 2019 10:28:07 +0000 (20:28 +1000)
committerDavin McCall <davmac@davmac.org>
Tue, 30 Apr 2019 10:28:07 +0000 (20:28 +1000)
src/proc-service.cc

index cfe86d6a343863b556bf9c2d1883f6b3ad6d6109..8db6877ca643341a2eb1faa30f31064127455b54 100644 (file)
@@ -190,9 +190,11 @@ void process_service::handle_exit_status(bp_sys::exit_status exit_status) noexce
         }
     }
 
+#if USE_UTMPX
     if (*inittab_id || *inittab_line) {
         clear_utmp_entry(inittab_id, inittab_line);
     }
+#endif
 
     if (service_state == service_state_t::STARTING) {
         // If state is STARTING, we must be waiting for readiness notification; the process has