supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Paul Sopka <psopka@sopka.ch>
To: "supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: Have s6-svscan send SIGTERM to one logger
Date: Mon, 2 Dec 2024 18:35:10 +0100	[thread overview]
Message-ID: <1a2c16c9-a1af-45f5-82ca-03c8c6b9da2b@sopka.ch> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 908 bytes --]

Hey everybody

I have a logger supervised by the very s6-svscan instance it logs 
through the fifo trick.
Now sending SIGTERM to the s6-svscan process won't work, since it waits 
for the logger forever,
which in turn waits for s6-svscan to close the fifo.
I have solved this by the following script:

.s6-svscan/SIGTERM

| #!/bin/execlineb -P
|
| # in case no message has been sent yet
| foreground { echo }
|
| foreground { s6-svc -h s6-svscan-log }
|
| s6-svscanctl -t .

This has the obvious downside that the catch all logger is brought down 
early.
Since this is not the main supervision tree, I require the ability to 
stop this instance of s6-svscan.
This also means that it is not too bad that the catch all logger is 
brought down early,
since logs are propagated up the hierarchy.

Still, I wonder whether there is a more elegant solution to this.

Regards

Paul


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3195 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

             reply	other threads:[~2024-12-02 17:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 17:35 Paul Sopka [this message]
2024-12-02 19:37 ` Laurent Bercot
2024-12-02 21:05   ` Paul Sopka
2024-12-03  0:56     ` Re[2]: " Laurent Bercot

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=1a2c16c9-a1af-45f5-82ca-03c8c6b9da2b@sopka.ch \
    --to=psopka@sopka.ch \
    --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
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).