summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-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
@@ -55,6 +55,12 @@ BEGIN
foreground = 1;
END
+OPTION(no-init,,,
+ [<don't suppose SysV init mode if PID is 1>])
+BEGIN
+ /* handled separately */
+END
+
OPTION(inetd,i,,
[<run in inetd mode>])
BEGIN
diff --git a/src/pies.c b/src/pies.c
index c0c1306..503be73 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -2032,6 +2032,7 @@ main (int argc, char **argv)
extern char **environ;
struct grecs_list_entry *ep;
int diag_flags;
+ int i;
set_program_name (argv[0]);
#ifdef ENABLE_NLS
@@ -2049,6 +2050,14 @@ main (int argc, char **argv)
set_quoting_style (NULL, shell_quoting_style);
init_process = getpid () == 1;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], "--no-init") == 0)
+ {
+ init_process = 0;
+ break;
+ }
+ }
/* Set default logging */
if (init_process)

Return to:

Send suggestions and report system problems to the System administrator.