From 1ccaa09a43075be668f1515b54cd4a228da3057b Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Mon, 19 Mar 2018 22:59:32 +0000 Subject: [PATCH] service stopped(): release console if have_console is set. Previously relied on onstart_flags.runs_on_console, which should also be accurate, but seeing as we have a flag available with the exact semantics guaranteed then we should use that. --- src/service.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service.cc b/src/service.cc index 5e6fe4f..9acc09c 100644 --- a/src/service.cc +++ b/src/service.cc @@ -52,7 +52,7 @@ void service_set::stop_service(const std::string & name) noexcept // is due to an unexpected process termination. void service_record::stopped() noexcept { - if (onstart_flags.runs_on_console) { + if (have_console) { bp_sys::tcsetpgrp(0, bp_sys::getpgrp()); discard_console_log_buffer(); release_console(); -- 2.25.1