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 CB6FC138334 for ; Tue, 9 Oct 2018 16:36:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B537BE07EE; Tue, 9 Oct 2018 16:35:58 +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 84A31E07EE for ; Tue, 9 Oct 2018 16:35:58 +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 3CF67335C94 for ; Tue, 9 Oct 2018 16:35:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 00D5B3E2 for ; Tue, 9 Oct 2018 16:35:54 +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: <1539102892.67e2d6033dd7ac6db0269ee060ed20484825ff9f.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master 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: 67e2d6033dd7ac6db0269ee060ed20484825ff9f X-VCS-Branch: master Date: Tue, 9 Oct 2018 16:35:54 +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: 19b360be-d68e-4564-a967-d7c75ac43cdd X-Archives-Hash: 6a18b42a4b6835dceb3d387bf080ef37 commit: 67e2d6033dd7ac6db0269ee060ed20484825ff9f Author: William Hubbs gmail com> AuthorDate: Tue Oct 9 16:34:52 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Oct 9 16:34:52 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=67e2d603 Complete implementation of forever timeout value in stop schedules src/rc/rc-schedules.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rc/rc-schedules.c b/src/rc/rc-schedules.c index 8f36f073..f7ef20fb 100644 --- a/src/rc/rc-schedules.c +++ b/src/rc/rc-schedules.c @@ -351,8 +351,9 @@ int run_stop_schedule(const char *applet, tkilled += nkilled; break; + case SC_FOREVER: case SC_TIMEOUT: - if (item->value < 1) { + if (item->type == SC_TIMEOUT && item->value < 1) { item = NULL; break; } @@ -360,7 +361,7 @@ int run_stop_schedule(const char *applet, ts.tv_sec = 0; ts.tv_nsec = POLL_INTERVAL; - for (nsecs = 0; nsecs < item->value; nsecs++) { + for (nsecs = 0; item->type == SC_FOREVER || nsecs < item->value; nsecs++) { for (nloops = 0; nloops < ONE_SECOND / POLL_INTERVAL; nloops++)