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 B23DC1396D9 for ; Thu, 26 Oct 2017 18:58:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 187A82BC00E; Thu, 26 Oct 2017 18:58:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 E7DE02BC00E for ; Thu, 26 Oct 2017 18:58:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 17DFA34069A for ; Thu, 26 Oct 2017 18:58:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8188A835 for ; Thu, 26 Oct 2017 18:58:26 +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: <1509044224.d019f34a83b0ad5e890f685b1263b281ab54ce54.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master 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: d019f34a83b0ad5e890f685b1263b281ab54ce54 X-VCS-Branch: master Date: Thu, 26 Oct 2017 18:58:26 +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: dbb499ad-0d54-4108-8844-aef8cab767d2 X-Archives-Hash: 283696a10f71098864819820f1f8b204 commit: d019f34a83b0ad5e890f685b1263b281ab54ce54 Author: William Hubbs gmail com> AuthorDate: Thu Oct 26 18:57:04 2017 +0000 Commit: William Hubbs gentoo org> CommitDate: Thu Oct 26 18:57:04 2017 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=d019f34a 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)