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 A1B2D139694 for ; Mon, 3 Apr 2017 15:45:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9AE4EE083E; Mon, 3 Apr 2017 15:45:16 +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-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77FFFE083E for ; Mon, 3 Apr 2017 15:45:16 +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 4297133D3CE for ; Mon, 3 Apr 2017 15:45:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A138472DA for ; Mon, 3 Apr 2017 15:45:13 +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: <1491234220.9eb669591e16c5ee0ca07babe058d0b7b2396077.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/start-stop-daemon.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 9eb669591e16c5ee0ca07babe058d0b7b2396077 X-VCS-Branch: master Date: Mon, 3 Apr 2017 15:45:13 +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: 0bef8bd4-2e08-4316-acef-42f1534e19bc X-Archives-Hash: 2fec77f8de553b43cfcf732c9305df6c commit: 9eb669591e16c5ee0ca07babe058d0b7b2396077 Author: Austin English gmail com> AuthorDate: Fri Mar 31 18:59:38 2017 +0000 Commit: William Hubbs gentoo org> CommitDate: Mon Apr 3 15:43:40 2017 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=9eb66959 start-stop-daemon: warn if calling --start with --retry or --stop with --wait This fixes #122 src/rc/start-stop-daemon.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index e9f9848c..c88bc962 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -960,6 +960,9 @@ int main(int argc, char **argv) if (redirect_stdout || redirect_stderr) eerrorx("%s: --stdout and --stderr are only relevant" " with --start", applet); + if (start_wait) + ewarn("using --wait with --stop has no effect," + " use --retry instead"); } else { if (!exec) eerrorx("%s: nothing to start", applet); @@ -1012,7 +1015,11 @@ int main(int argc, char **argv) eerror("%s: %s does not exist", applet, *exec_file ? exec_file : exec); exit(EXIT_FAILURE); + } + if (start && retry) + ewarn("using --retry with --start has no effect," + " use --wait instead"); /* If we don't have a pidfile we should check if it's interpreted * or not. If it we, we need to pass the interpreter through