public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:0.34.x commit in: src/rc/
Date: Thu, 26 Oct 2017 19:01:57 +0000 (UTC)	[thread overview]
Message-ID: <1509044467.6e6b4ac5fa935eb8052d293f2b8378e0395572e1.williamh@OpenRC> (raw)

commit:     6e6b4ac5fa935eb8052d293f2b8378e0395572e1
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Oct 26 18:57:04 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Oct 26 19:01:07 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=6e6b4ac5

supervise-daemon: log the command line we run to spawn the child process

 src/rc/supervise-daemon.c | 9 +++++++++
 1 file changed, 9 insertions(+)

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)


             reply	other threads:[~2017-10-26 19:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26 19:01 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-11-29 22:10 [gentoo-commits] proj/openrc:0.34.x commit in: src/rc/ William Hubbs
2017-11-27 19:09 William Hubbs
2017-11-20 17:56 William Hubbs
2017-11-07 21:39 William Hubbs
2017-11-07 21:39 William Hubbs
2017-10-28  0:29 William Hubbs
2017-10-28  0:29 William Hubbs
2017-10-26 19:19 William Hubbs
2017-10-26 19:01 William Hubbs
2017-10-26 19:01 William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509044467.6e6b4ac5fa935eb8052d293f2b8378e0395572e1.williamh@OpenRC \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox