From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/876 Path: news.gmane.org!not-for-mail From: Charles Duffy Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: runit - access to run script's exit status for finish? Date: Thu, 15 Sep 2005 13:10:04 -0500 Message-ID: References: <20050531190911.25938.qmail@adf4e649eec508.315fe32.mid.smarden.org> <20050601000521.GB32490@grummit.biaix.org> <20050827192438.24239.qmail@573d30f8a31845.315fe32.mid.smarden.org> <20050829080807.24479.qmail@b57f7a37a4464e.315fe32.mid.smarden.org> <20050915092844.4037.qmail@6530944879c9e2.315fe32.mid.smarden.org> <20050915144140.2536.qmail@1c84fcc3458bfc.315fe32.mid.smarden.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1126808203 27419 80.91.229.2 (15 Sep 2005 18:16:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Sep 2005 18:16:43 +0000 (UTC) Original-X-From: supervision-return-1112-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Sep 15 20:16:43 2005 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1EFyFV-0000tC-Jq for gcsg-supervision@gmane.org; Thu, 15 Sep 2005 20:14:17 +0200 Original-Received: (qmail 19166 invoked by uid 76); 15 Sep 2005 18:14:39 -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 19160 invoked from network); 15 Sep 2005 18:14:38 -0000 X-Injected-Via-Gmane: http://gmane.org/ Original-To: supervision@list.skarnet.org Original-Lines: 26 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: fwext1-ext.isgenesis.com User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en In-Reply-To: <20050915144140.2536.qmail@1c84fcc3458bfc.315fe32.mid.smarden.org> Original-Sender: news Xref: news.gmane.org gmane.comp.sysutils.supervision.general:876 Archived-At: Gerrit Pape wrote: > On Thu, Sep 15, 2005 at 08:18:06AM -0400, Paul Jarc wrote: > >>Gerrit Pape wrote: >> >>> # sv status -r . >>> # >>>./run didn't terminate yet, since the supervisor started. >> >>Since the supervisor started, or since the last time ./run was >>started? The latter seems more useful to me. > > Yes, I agree. It should print nothing if ./run (or ./finish with -f) is > currently running. That's not very useful when chaining, though. If you run "sv status -r -p -s ." in a shell script, you're probably going to pipe it into something like "read exitstatus pid state"; excluding the exit status entirely if the program is currently running, then, means that you'd end up with your values stored in the wrong variables -- certainly not a desirable outcome. At minimum, a placeholder like "-" or "N/A" should be printed if one desires to indicate that no exit has occured. (That said, I'm still fond of my type:value syntax).