supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
Subject: Re: runit - access to run script's exit status for finish?
Date: Mon, 29 Aug 2005 08:12:39 +0000	[thread overview]
Message-ID: <20050829080807.24479.qmail@b57f7a37a4464e.315fe32.mid.smarden.org> (raw)
In-Reply-To: <pan.2005.08.27.22.56.33.30303@spamcop.net>

On Sat, Aug 27, 2005 at 05:56:34PM -0500, Charles Duffy wrote:
> On Sat, 27 Aug 2005 19:24:35 +0000, Gerrit Pape wrote:
> > I still don't know what's the best way to pass this information to the
> > ./finish script.  Providing the exit code of ./run through the
> > environment seems to be the best solution, but (1) only the ./finish
> > script's environment should be altered, not the ./run script's, and (2)
> > runsv currently doesn't allocate memory dynamically, I don't want to
> > change that.
> 
> I suppose doing an unsetenv() is unacceptable because it would interfere
> wih run's environment if run had set (or was expecting the outside world
> to set) a variable with the same name. Personally, to be honest, I'd
> consider this acceptable so long as it was documented and the chosen name
> was unlikely to collide with anything -- but even so, I can appreciate our
> reluctance to go this route.
> 
> Your suggestion of stuffing it in the status file makes sense, then -- but
> a convenient way to get the info still out is still needed. How about
> having an argument to runsvstat to retrieve *only* this piece of
> information? (For that matter, being able to do the same with other data
> in the status file would be likewise useful).

This sounds like a very good idea.  I didn't re-check, but it should be
possible to extend the supervise/status file by two bytes, being the
last return code from ./run and ./finish, initially 0, without breaking
backward compatibility.

To query this information, I would prefer to extend the sv program, not
runsvstat.  runsvctrl, runsvstat, svwaitdown, svwaitup, most probably
will get obsolete some time, as the functionality is integrated into sv.
I'm not sure about the user interface, whether sv should support special
commands for this, or command line switches, or so.

Regards, Gerrit.


  reply	other threads:[~2005-08-29  8:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25 16:26 Charles Duffy
2005-05-29  5:52 ` Gerrit Pape
2005-05-30  7:42   ` Laurent Bercot
2005-05-31 11:49     ` Gerrit Pape
2005-05-31 14:28       ` Paul Jarc
2005-05-31 19:09         ` Gerrit Pape
2005-06-01  0:05           ` Joan Picanyol i Puig
2005-08-26 20:30             ` Charles Duffy
2005-08-27 19:24               ` Gerrit Pape
2005-08-27 22:56                 ` Charles Duffy
2005-08-29  8:12                   ` Gerrit Pape [this message]
2005-08-29 10:08                     ` Charles Duffy
2005-08-30 11:06                       ` Gerrit Pape
2005-08-30 16:55                         ` Charles Duffy
2005-09-01  9:13                           ` Gerrit Pape
2005-09-12 15:11                     ` Charles Duffy
2005-09-15  9:33                       ` Gerrit Pape
2005-09-15 12:18                         ` Paul Jarc
2005-09-15 14:46                           ` Gerrit Pape
2005-09-15 18:10                             ` Charles Duffy
2005-09-16  8:15                               ` Gerrit Pape
2005-08-27 23:01                 ` Charles Duffy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050829080807.24479.qmail@b57f7a37a4464e.315fe32.mid.smarden.org \
    --to=pape@smarden.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).