Re: writing s6 services

From: Guillermo <gdiazhartusch_at_gmail.com>
Date: Tue, 3 Nov 2020 13:54:49 -0300

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.
Received on Tue Nov 03 2020 - 16:54:49 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC