aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmdline.opt6
-rw-r--r--src/pies.c9
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
@@ -52,12 +52,18 @@ OPTION(foreground,,,
52 [<remain in foreground>]) 52 [<remain in foreground>])
53BEGIN 53BEGIN
54 log_to_stderr_only = 1; 54 log_to_stderr_only = 1;
55 foreground = 1; 55 foreground = 1;
56END 56END
57 57
58OPTION(no-init,,,
59 [<don't suppose SysV init mode if PID is 1>])
60BEGIN
61 /* handled separately */
62END
63
58OPTION(inetd,i,, 64OPTION(inetd,i,,
59 [<run in inetd mode>]) 65 [<run in inetd mode>])
60BEGIN 66BEGIN
61 if (!instance) 67 if (!instance)
62 instance = "inetd"; 68 instance = "inetd";
63 current_syntax = &config_syntax_tab[CONF_INETD]; 69 current_syntax = &config_syntax_tab[CONF_INETD];
diff --git a/src/pies.c b/src/pies.c
index c0c1306..503be73 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -2029,12 +2029,13 @@ int
2029main (int argc, char **argv) 2029main (int argc, char **argv)
2030{ 2030{
2031 pid_t pid; 2031 pid_t pid;
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
2038 setlocale (LC_ALL, ""); 2039 setlocale (LC_ALL, "");
2039 bindtextdomain (PACKAGE, LOCALEDIR); 2040 bindtextdomain (PACKAGE, LOCALEDIR);
2040 textdomain (PACKAGE); 2041 textdomain (PACKAGE);
@@ -2046,12 +2047,20 @@ main (int argc, char **argv)
2046 pies_master_argc = argc; 2047 pies_master_argc = argc;
2047 pies_master_argv = argv; 2048 pies_master_argv = argv;
2048 2049
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)
2055 { 2064 {
2056 log_facility = LOG_DAEMON; 2065 log_facility = LOG_DAEMON;
2057 diag_flags = DIAG_TO_STDERR | DIAG_REOPEN_LOG; 2066 diag_flags = DIAG_TO_STDERR | DIAG_REOPEN_LOG;

Return to:

Send suggestions and report system problems to the System administrator.