From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1981 Path: news.gmane.org!not-for-mail From: Earl Chew Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: sv sometimes won't issue down request Date: Mon, 27 Jul 2009 10:39:34 -0700 Message-ID: <4A6DE656.7090208@agilent.com> References: <8F9355C5-C168-4AD7-8B6C-502416E7EECC@zoy.org> <94175859-2733-4ACF-85E9-DD5FF627F23B@zoy.org> <17A739BC-94BA-4611-A523-6978934F0D61@zoy.org> <4A633321.1060207@agilent.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1248716390 12084 80.91.229.12 (27 Jul 2009 17:39:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jul 2009 17:39:50 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2216-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Jul 27 19:39:43 2009 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1MVUAp-0000sp-OQ for gcsg-supervision@gmane.org; Mon, 27 Jul 2009 19:39:43 +0200 Original-Received: (qmail 29912 invoked by uid 76); 27 Jul 2009 17:41:01 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 29904 invoked from network); 27 Jul 2009 17:41:00 -0000 User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: X-OriginalArrivalTime: 27 Jul 2009 17:39:36.0495 (UTC) FILETIME=[35B4C3F0:01CA0EE1] X-Scanned-By: MPP/Clamd http://www.messagepartners.com X-Scanned-By: MPP invoked on aglcosbs01 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1981 Archived-At: Gerrit Pape wrote: >> Denys Vlasenko wrote: >> >>> I propose just removing this test: >>> >>> if (svstatus.want == *a) >>> return 0; Gerrit, My original proposed patch (for the BusyBox implementation) was: + if (svstatus.want == *a) { + if (*a != 'd' || ! svstatus.pid_le32) + return 0; + } which is very similar to your proposed patch: > if (svstatus_get() <= 0) return(-1); > - if (svstatus[17] == *a) return(0); > + if (svstatus[17] == *a) > + if (*a != 'd' || svstatus[18] == 1) return(0); Is it preferred to test for svstatus[18] rather than checking for an active PID ? Are you saying that we're better of checking for this "special case" rather than removing the optimisation in its entirety? Earl