supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Guillermo <gdiazhartusch@gmail.com>
To: Supervision <supervision@list.skarnet.org>
Subject: Re: writing s6 services
Date: Tue, 3 Nov 2020 13:54:49 -0300
Message-ID: <CADQ2Nw8Zf1ahV57Tk5q6m59ZHxQX299kuF+8HZuad_h4BDDPqQ@mail.gmail.com> (raw)
In-Reply-To: <CAH9hU4+789eeBzC52YMfF_3i7m=2CnnGFgka-DUGZjkL3UA1YA@mail.gmail.com>

El mar., 3 nov. 2020 a las 8:48, billa chaitanya escribió:
>
> >                So, Is there any variable we can use inside run or finish
> > script of a service equivalent to the pid of the  process started inside
> > run script?

The PID of the supervised process will be the same as that of the
'run' script if it is correctly written, so it's $$ for a shell
script, and the value of the environment variable specified to the
getpid program for an execline script.

* http://www.skarnet.org/software/execline/getpid.html

It is not available inside the 'finish' script, but even if it was, it
is no longer useful since, if that script is being executed, the
supervised process has already terminated, and the PID it had has been
'released'.

G.

      reply	other threads:[~2020-11-03 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28  8:01 billa chaitanya
2020-10-28 14:01 ` Laurent Bercot
2020-11-03 11:48   ` billa chaitanya
2020-11-03 16:54     ` Guillermo [this message]

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=CADQ2Nw8Zf1ahV57Tk5q6m59ZHxQX299kuF+8HZuad_h4BDDPqQ@mail.gmail.com \
    --to=gdiazhartusch@gmail.com \
    --cc=supervision@list.skarnet.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

supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/supervision

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 supervision supervision/ http://inbox.vuxu.org/supervision \
		subscribe@list.skarnet.org
	public-inbox-index supervision

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.supervision.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git