diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index cb778359fc..c5d88dfd82 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -5053,6 +5053,8 @@ int exec_invoke( return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid command line arguments."); } + rename_process_from_path(command->path); + if (context->std_input == EXEC_INPUT_SOCKET || context->std_output == EXEC_OUTPUT_SOCKET || context->std_error == EXEC_OUTPUT_SOCKET) { @@ -5078,8 +5080,6 @@ int exec_invoke( return log_error_errno(r, "Failed to load a named file descriptor: %m"); } - rename_process_from_path(command->path); - /* We reset exactly these signals, since they are the only ones we set to SIG_IGN in the main * daemon. All others we leave untouched because we set them to SIG_DFL or a valid handler initially, * both of which will be demoted to SIG_DFL. */