From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2515 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: wrong exit code for sv status in lsb mode Date: Wed, 13 Mar 2019 08:04:07 +0000 Message-ID: <20190313080407.5662.qmail@f0acb20213ddef.315fe32.mid.smarden.org> References: <20190108081147.11948.qmail@83e0cb8f62b7f0.315fe32.mid.smarden.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="66000"; mail-complaints-to="usenet@blaine.gmane.org" To: supervision@list.skarnet.org Original-X-From: supervision-return-2105-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Mar 13 09:04:15 2019 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1h3ys2-000H15-BQ for gcsg-supervision@m.gmane.org; Wed, 13 Mar 2019 09:04:14 +0100 Original-Received: (qmail 27812 invoked by uid 89); 13 Mar 2019 08:04:38 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27805 invoked from network); 13 Mar 2019 08:04:38 -0000 Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2515 Archived-At: On Tue, Jan 08, 2019 at 08:19:30AM -0800, David Mountney via supervision wrote: > The error was introduced in commit 5fe1bc773c2d979093fe4b1f3ecbbed5e6acdaf0 > "sv.c: properly format status command's output on failure cases." > > Where the log status is being saved to the same variable as the service > status. The quick fix would be to not record the log status for now: > > $ git diff src/sv.c > diff --git a/src/sv.c b/src/sv.c > index 9003142..1676227 100644 > --- a/src/sv.c > +++ b/src/sv.c > @@ -167,7 +167,7 @@ int status(char *unused) { > } > else { > outs("; "); > - if (svstatus_get()) { rc =svstatus_print("log"); outs("\n"); } > + if (svstatus_get()) { svstatus_print("log"); outs("\n"); } > } > islog =0; > flush(""); > $ Thanks for the patch, David. I'm looking forward to do a maintenance release of runit eventually and am collecting patches. I'm about to apply this one, has anyone applied it already and can provide feedback? Regards, Gerrit.