Browse Source

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

OPENBSD_6_1
Franciszek Koltuniuk 8 years ago
parent
commit
78bf7f00b9
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      patches/0008-initialize-setproctitle-where-needed.patch

+ 2
- 1
patches/0008-initialize-setproctitle-where-needed.patch View File

@ -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) {


Loading…
Cancel
Save