From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1958 Path: news.gmane.org!not-for-mail From: Mathieu Poumeyrol Newsgroups: gmane.comp.sysutils.supervision.general Subject: Bug for sv status in lsb mode Date: Mon, 13 Jul 2009 10:00:58 +0200 Message-ID: <8F9355C5-C168-4AD7-8B6C-502416E7EECC@zoy.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1247472073 9453 80.91.229.12 (13 Jul 2009 08:01:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 08:01:13 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2193-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Jul 13 10:01:06 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 1MQGTB-000477-Py for gcsg-supervision@gmane.org; Mon, 13 Jul 2009 10:01:05 +0200 Original-Received: (qmail 31996 invoked by uid 76); 13 Jul 2009 08:02:17 -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 31988 invoked from network); 13 Jul 2009 08:02:17 -0000 X-Mailer: Apple Mail (2.935.3) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1958 Archived-At: Hello there, I have tracked down a bug in the lsb-compatible code for sv status: sv return 0 even if the service is down. The variable r in the "status" function in the sv.c file is global, and altered in the curse of the function, making the last test useless. From what I have seen, saving the status in a local variable instead of using the global r solve the issue, but I don't know if this fix is without side-effect. I hope somebody can fix this in a proper way and push the changes. Thanks !