aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2017-10-26 13:57:04 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2017-10-26 13:57:04 -0500
commitd019f34a83b0ad5e890f685b1263b281ab54ce54 (patch)
treebe30faea388b67871f34c8124afa7cc336828fbe /src
parentbb9c481f02cb1843e00bf32e98caf18b6b56bb4d (diff)
supervise-daemon: log the command line we run to spawn the child process
Diffstat (limited to 'src')
-rw-r--r--src/rc/supervise-daemon.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 6c3c55bf..abb4a59e 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -556,6 +556,7 @@ int main(int argc, char **argv)
int child_argc = 0;
char **child_argv = NULL;
char *str = NULL;
+ char cmdline[PATH_MAX];
applet = basename_c(argv[0]);
atexit(cleanup);
@@ -721,6 +722,13 @@ int main(int argc, char **argv)
if (!pidfile && !reexec)
eerrorx("%s: --pidfile must be specified", applet);
+ *cmdline = '\0';
+ c = argv;
+ while (c && *c) {
+ strcat(cmdline, *c);
+ strcat(cmdline, " ");
+ c++;
+ }
endpwent();
argc -= optind;
argv += optind;
@@ -818,6 +826,7 @@ int main(int argc, char **argv)
parse_schedule(applet, NULL, sig);
einfov("Detaching to start `%s'", exec);
+ syslog(LOG_INFO, "Running command line: %s", cmdline);
/* Remove existing pidfile */
if (pidfile)