summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core/execute.c15
-rw-r--r--src/core/execute.h1
-rw-r--r--src/core/service.c1
-rw-r--r--src/core/socket.c2
4 files changed, 4 insertions, 15 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index ed735a7660..80736abbfd 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2721,7 +2721,6 @@ static int exec_child(
const ExecParameters *params,
ExecRuntime *runtime,
DynamicCreds *dcreds,
- char **argv,
int socket_fd,
int named_iofds[3],
int *fds,
@@ -2817,7 +2816,7 @@ static int exec_child(
const char *vc = params->confirm_spawn;
_cleanup_free_ char *cmdline = NULL;
- cmdline = exec_command_line(argv);
+ cmdline = exec_command_line(command->argv);
if (!cmdline) {
*exit_status = EXIT_MEMORY;
return log_oom();
@@ -3396,7 +3395,7 @@ static int exec_child(
strv_free_and_replace(accum_env, ee);
}
- final_argv = replace_env_argv(argv, accum_env);
+ final_argv = replace_env_argv(command->argv, accum_env);
if (!final_argv) {
*exit_status = EXIT_MEMORY;
return log_oom();
@@ -3442,13 +3441,10 @@ int exec_spawn(Unit *unit,
DynamicCreds *dcreds,
pid_t *ret) {
+ int socket_fd, r, named_iofds[3] = { -1, -1, -1 }, *fds = NULL;
_cleanup_strv_free_ char **files_env = NULL;
- int *fds = NULL;
size_t n_storage_fds = 0, n_socket_fds = 0;
_cleanup_free_ char *line = NULL;
- int socket_fd, r;
- int named_iofds[3] = { -1, -1, -1 };
- char **argv;
pid_t pid;
assert(unit);
@@ -3488,8 +3484,7 @@ int exec_spawn(Unit *unit,
if (r < 0)
return log_unit_error_errno(unit, r, "Failed to load environment files: %m");
- argv = params->argv ?: command->argv;
- line = exec_command_line(argv);
+ line = exec_command_line(command->argv);
if (!line)
return log_oom();
@@ -3512,7 +3507,6 @@ int exec_spawn(Unit *unit,
params,
runtime,
dcreds,
- argv,
socket_fd,
named_iofds,
fds,
@@ -3662,7 +3656,6 @@ static void exec_command_done(ExecCommand *c) {
assert(c);
c->path = mfree(c->path);
-
c->argv = strv_free(c->argv);
}
diff --git a/src/core/execute.h b/src/core/execute.h
index de44085492..81a118c5cd 100644
--- a/src/core/execute.h
+++ b/src/core/execute.h
@@ -292,7 +292,6 @@ typedef enum ExecFlags {
} ExecFlags;
struct ExecParameters {
- char **argv;
char **environment;
int *fds;
diff --git a/src/core/service.c b/src/core/service.c
index db1356c417..872bb77526 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1446,7 +1446,6 @@ static int service_spawn(
SET_FLAG(exec_params.flags, EXEC_NSS_BYPASS_BUS,
MANAGER_IS_SYSTEM(UNIT(s)->manager) && unit_has_name(UNIT(s), SPECIAL_DBUS_SERVICE));
- exec_params.argv = c->argv;
exec_params.environment = final_env;
exec_params.fds = fds;
exec_params.fd_names = fd_names;
diff --git a/src/core/socket.c b/src/core/socket.c
index 56d32225c4..1bd32cf250 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1889,8 +1889,6 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
unit_set_exec_params(UNIT(s), &exec_params);
- exec_params.argv = c->argv;
-
r = exec_spawn(UNIT(s),
c,
&s->exec_context,