supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Have s6-svscan send SIGTERM to one logger
@ 2024-12-02 17:35 Paul Sopka
  2024-12-02 19:37 ` Laurent Bercot
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Sopka @ 2024-12-02 17:35 UTC (permalink / raw)
  To: supervision


[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-03  0:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-02 17:35 Have s6-svscan send SIGTERM to one logger Paul Sopka
2024-12-02 19:37 ` Laurent Bercot
2024-12-02 21:05   ` Paul Sopka
2024-12-03  0:56     ` Re[2]: " Laurent Bercot

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).