aboutsummaryrefslogtreecommitdiff
path: root/src/pies.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pies.c')
-rw-r--r--src/pies.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/pies.c b/src/pies.c
index f069552..875684a 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -2130,6 +2130,9 @@ set_state_file_names (const char *base)
qotdfile = mkfilename (statedir, base, ".qotd");
}
+size_t pies_master_argc;
+char **pies_master_argv;
+
int
main (int argc, char **argv)
{
@@ -2146,6 +2149,9 @@ main (int argc, char **argv)
textdomain (PACKAGE);
#endif
mf_proctitle_init (argc, argv, environ);
+
+ pies_master_argc = argc;
+ pies_master_argv = argv;
set_quoting_style (NULL, shell_quoting_style);
@@ -2392,8 +2398,15 @@ main (int argc, char **argv)
pies_pause ();
switch (action)
{
- case ACTION_STOP:
case ACTION_RESTART:
+ if (argv[0][0] != '/' || init_process)
+ {
+ logmsg (LOG_INFO, _("restart command ignored"));
+ action = ACTION_CONT;
+ }
+ break;
+
+ case ACTION_STOP:
if (init_process)
{
debug (1, ("ignoring stop/restart"));
@@ -2436,7 +2449,7 @@ main (int argc, char **argv)
progman_stop ();
remove_pidfile (pidfile);
- if (action == ACTION_RESTART && argv[0][0] == '/')
+ if (action == ACTION_RESTART)
{
int minfd = DIAG_OUTPUT (DIAG_TO_STDERR) ? 2 : 0;
int i;

Return to:

Send suggestions and report system problems to the System administrator.