When running in a VM, we now support propagating the exit status
via a vsock notify socket, so drop the restrictions on propagating
an exit status when not in a container to make sure this works
properly.
if (r < 0)
return r;
- if (MANAGER_IS_SYSTEM(m) && detect_container() <= 0)
- return sd_bus_error_set(error, SD_BUS_ERROR_NOT_SUPPORTED, "ExitCode can only be set for user service managers or in containers.");
-
m->return_value = code;
return sd_bus_reply_method_return(message, NULL);
if (log_get_show_time())
command_line[pos++] = "--log-time";
- if (objective == MANAGER_EXIT) {
- xsprintf(exit_code, "--exit-code=%d", retval);
- command_line[pos++] = exit_code;
- }
+ xsprintf(exit_code, "--exit-code=%d", retval);
+ command_line[pos++] = exit_code;
assert(pos < ELEMENTSOF(command_line));