From 78bf7f00b93e40a18c2d66cb0f921669a23704a1 Mon Sep 17 00:00:00 2001 From: Franciszek Koltuniuk Date: Thu, 19 Jan 2017 10:37:14 +0000 Subject: [PATCH] fix #35 options like -v -s are not passed to the new processes, on platform where setproctitle is not defined, this can happen since argv0 is passed to the new processes, but the options references by argv0 are truncated in function compat_init_setproctitle() line 104 --- patches/0008-initialize-setproctitle-where-needed.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patches/0008-initialize-setproctitle-where-needed.patch b/patches/0008-initialize-setproctitle-where-needed.patch index 01d640b..33e6d46 100644 --- a/patches/0008-initialize-setproctitle-where-needed.patch +++ b/patches/0008-initialize-setproctitle-where-needed.patch @@ -36,7 +36,7 @@ index 463600a..70e5ae7 100644 if (strcmp(__progname, "ntpctl") == 0) { ctl_main(argc, argv); /* NOTREACHED */ -@@ -147,6 +156,16 @@ main(int argc, char *argv[]) +@@ -147,6 +156,17 @@ main(int argc, char *argv[]) memset(&lconf, 0, sizeof(lconf)); @@ -48,6 +48,7 @@ index 463600a..70e5ae7 100644 + saved_argv[i] = NULL; + compat_init_setproctitle(argc, argv); + argv = saved_argv; ++ argv0 = argv; +#endif + while ((ch = getopt(argc, argv, "df:nP:p:sSv")) != -1) {