From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C3E061396DA for ; Thu, 26 Oct 2017 19:02:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E6BC2BC027; Thu, 26 Oct 2017 19:02:01 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1C6132BC022 for ; Thu, 26 Oct 2017 19:02:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1B19E33C770 for ; Thu, 26 Oct 2017 19:02:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 41DA4836 for ; Thu, 26 Oct 2017 19:01:57 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1509044467.6e6b4ac5fa935eb8052d293f2b8378e0395572e1.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:0.34.x commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/supervise-daemon.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 6e6b4ac5fa935eb8052d293f2b8378e0395572e1 X-VCS-Branch: 0.34.x Date: Thu, 26 Oct 2017 19:01:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5ee61c7d-547c-4731-a80b-8c11b7592a2c X-Archives-Hash: c3f40fd18a66f86fd267189073e7c0b3 commit: 6e6b4ac5fa935eb8052d293f2b8378e0395572e1 Author: William Hubbs gmail com> AuthorDate: Thu Oct 26 18:57:04 2017 +0000 Commit: William Hubbs gentoo 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)