- s->exec_context.std_output = s->meta.manager->sysv_console ? EXEC_OUTPUT_TTY : EXEC_OUTPUT_NULL;
+ s->exec_context.std_output =
+ (s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
+ ? EXEC_OUTPUT_TTY : EXEC_OUTPUT_NULL;
"%sType: %s\n"
"%sRestart: %s\n"
"%sNotifyAccess: %s\n",
prefix, service_state_to_string(s->state),
prefix, yes_no(s->permissions_start_only),
prefix, yes_no(s->root_directory_start_only),
"%sType: %s\n"
"%sRestart: %s\n"
"%sNotifyAccess: %s\n",
prefix, service_state_to_string(s->state),
prefix, yes_no(s->permissions_start_only),
prefix, yes_no(s->root_directory_start_only),
prefix, service_type_to_string(s->type),
prefix, service_restart_to_string(s->restart),
prefix, notify_access_to_string(s->notify_access));
prefix, service_type_to_string(s->type),
prefix, service_restart_to_string(s->restart),
prefix, notify_access_to_string(s->notify_access));
if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&
(s->bus_name_good || s->type != SERVICE_DBUS))
service_set_state(s, SERVICE_RUNNING);
if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&
(s->bus_name_good || s->type != SERVICE_DBUS))
service_set_state(s, SERVICE_RUNNING);
service_set_state(s, SERVICE_EXITED);
else
service_enter_stop(s, true);
service_set_state(s, SERVICE_EXITED);
else
service_enter_stop(s, true);
- success = is_clean_exit(code, status);
+ if (s->sysv_path)
+ success = is_clean_exit_lsb(code, status);
+ else
+ success = is_clean_exit(code, status);
.bus_name_owner_change = service_bus_name_owner_change,
.bus_query_pid_done = service_bus_query_pid_done,
.bus_name_owner_change = service_bus_name_owner_change,
.bus_query_pid_done = service_bus_query_pid_done,