diff options
-rw-r--r-- | src/cmdline.opt | 6 | ||||
-rw-r--r-- | src/pies.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt index 5380b80..57f5b90 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt | |||
@@ -55,6 +55,12 @@ BEGIN | |||
55 | foreground = 1; | 55 | foreground = 1; |
56 | END | 56 | END |
57 | 57 | ||
58 | OPTION(no-init,,, | ||
59 | [<don't suppose SysV init mode if PID is 1>]) | ||
60 | BEGIN | ||
61 | /* handled separately */ | ||
62 | END | ||
63 | |||
58 | OPTION(inetd,i,, | 64 | OPTION(inetd,i,, |
59 | [<run in inetd mode>]) | 65 | [<run in inetd mode>]) |
60 | BEGIN | 66 | BEGIN |
@@ -2032,6 +2032,7 @@ main (int argc, char **argv) | |||
2032 | extern char **environ; | 2032 | extern char **environ; |
2033 | struct grecs_list_entry *ep; | 2033 | struct grecs_list_entry *ep; |
2034 | int diag_flags; | 2034 | int diag_flags; |
2035 | int i; | ||
2035 | 2036 | ||
2036 | set_program_name (argv[0]); | 2037 | set_program_name (argv[0]); |
2037 | #ifdef ENABLE_NLS | 2038 | #ifdef ENABLE_NLS |
@@ -2049,6 +2050,14 @@ main (int argc, char **argv) | |||
2049 | set_quoting_style (NULL, shell_quoting_style); | 2050 | set_quoting_style (NULL, shell_quoting_style); |
2050 | 2051 | ||
2051 | init_process = getpid () == 1; | 2052 | init_process = getpid () == 1; |
2053 | for (i = 1; i < argc; i++) | ||
2054 | { | ||
2055 | if (strcmp (argv[i], "--no-init") == 0) | ||
2056 | { | ||
2057 | init_process = 0; | ||
2058 | break; | ||
2059 | } | ||
2060 | } | ||
2052 | 2061 | ||
2053 | /* Set default logging */ | 2062 | /* Set default logging */ |
2054 | if (init_process) | 2063 | if (init_process) |