summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nspawn/nspawn.c3
-rw-r--r--src/shared/main-func.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 19eb5b6016..dfc4f68ede 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -4667,9 +4667,6 @@ static int run(int argc, char *argv[]) {
log_parse_environment();
log_open();
- /* Make sure rename_process() in the stub init process can work */
- save_argc_argv(argc, argv);
-
r = parse_argv(argc, argv);
if (r <= 0)
goto finish;
diff --git a/src/shared/main-func.h b/src/shared/main-func.h
index 3c182e802b..486976f65e 100644
--- a/src/shared/main-func.h
+++ b/src/shared/main-func.h
@@ -8,10 +8,12 @@
#include "spawn-ask-password-agent.h"
#include "spawn-polkit-agent.h"
#include "static-destruct.h"
+#include "util.h"
#define _DEFINE_MAIN_FUNCTION(intro, impl, ret) \
int main(int argc, char *argv[]) { \
int r; \
+ save_argc_argv(argc, argv); \
intro; \
r = impl; \
static_destruct(); \