From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-973524-garchives=archives.gentoo.org@lists.gentoo.org>
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 74C241396D1
	for <garchives@archives.gentoo.org>; Mon, 18 Sep 2017 18:07:23 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 87E8F1FC008;
	Mon, 18 Sep 2017 18:07:22 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(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 645431FC008
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Sep 2017 18:07:22 +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 8B2643402FE
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Sep 2017 18:07:21 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 279F79086
	for <gentoo-commits@lists.gentoo.org>; Mon, 18 Sep 2017 18:07:20 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
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" <williamh@gentoo.org>
Message-ID: <1505748522.dec0722c30e41480d300549a69d3672c38e0c15d.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:0.31.x commit in: src/rc/
X-VCS-Repository: proj/openrc
X-VCS-Files: src/rc/rc-schedules.c
X-VCS-Directories: src/rc/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: dec0722c30e41480d300549a69d3672c38e0c15d
X-VCS-Branch: 0.31.x
Date: Mon, 18 Sep 2017 18:07:20 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 8add76f0-b4b8-4e7f-bd3a-9e5d7072c123
X-Archives-Hash: e2257700f5b8623273ae31c1dc62538a

commit:     dec0722c30e41480d300549a69d3672c38e0c15d
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Sun Sep 17 19:20:05 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Sep 18 15:28:42 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=dec0722c

rc-schedules.c: pass the correct pid to rc_find_pids

This is for #163.

 src/rc/rc-schedules.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rc/rc-schedules.c b/src/rc/rc-schedules.c
index 13f615ee..164581d6 100644
--- a/src/rc/rc-schedules.c
+++ b/src/rc/rc-schedules.c
@@ -261,10 +261,10 @@ int do_stop(const char *applet, const char *exec, const char *const *argv,
 	bool killed;
 	int nkilled = 0;
 
-	if (pid)
+	if (pid > 0)
 		pids = rc_find_pids(NULL, NULL, 0, pid);
 	else
-		pids = rc_find_pids(exec, argv, uid, pid);
+		pids = rc_find_pids(exec, argv, uid, 0);
 
 	if (!pids)
 		return 0;