Re: Reason for s6-svscan -X

Paul Sopka <[email protected]> Mon, 3 Mar 2025 19:46:32 +0100
Newsgroups gmane.comp.sysutils.supervision.general
Message-ID <Z8X5CBoC9E_6qA6C@NANDERTY>
> 
>   The reason for -X is that s6-svscan and the s6-supervise process for
> s6-svscan-log need to keep an fd to the real console as well (we cannot
> hardcode /dev/console because on some systems it has another name).
> 
With my scripted approach I need to do "... redirfd -a 3 /dev/console s6-svscan -X3 ...",
so I need to write a special "compatible" script for all kernels anyway.

>   s6-svscan needs to restore its stdout and stderr to the real console
> if it exits/panic. It also needs to spawn the supervisor for 
> s6-svscan-log
> with stderr pointing to the real console, because that supervisor cannot
> assume that the s6-svscan-log fifo is always open for reading (and in
> fact, at spawn time, it is not) so this s6-supervise instance also needs
> to write its error messages to the real console.
> 
>   In short: the catch-all logger isn't the only process that needs to 
> know
> the real console, all its ancestors in the supervision tree do as well,
> because they're "lower level" than the catch-all logger.
> 
> --
>   Laurent
> 
Thank you for explaining,
Paul
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEklpwGqZx1YzBW1hqccfIWi6jD2IFAmfF+QUACgkQccfIWi6j
D2Iwbw//SBccftcsEdupaPDx+hJlrE+pzAXOH/ekNp5YXvVJhZ6ifUBNQ6DN6RXo
4eigb7C3fuzWWPbwuyXcCzdk8Z78u6totokZo0oIvDikAO3Ld6ZcXbRvxOGPJ2q7
PPxnHxEGfY1MGRhWOtLNx4IHeAvnXo92iH5/iA7m9Y/6N06mLd2mA8H5F1ydCwAR
7icKtqXgRCbcxpFrqd7032DaVLdsO73KY8I9bJF+qOv3HGzrZHxGBX/8DL/oH3se
Kozw5kHipZCuFiVOcGO1BK085SYsD1A0KGvnqRpMTlnkGnQY+4yL6NwFvPMDPFFo
MlnR74TZV4C4jVMlhKNraG2z/3tl6MX/XsgWUELsTrZKn7XN9GqQIpemoaHhyI+u
vwZqvByirBY77PVFlTG62BM1Vmo9mBY9vnSYKIS3G24b6aVZoMAdUyaObii9XIkd
VUVCx9ssH9Me0C3ZM2bT7Zc937DwZn1qDpPPkjB6lKy5azUFh2g+24HwBBLB0OBT
WJy8J+LkMLBh8ghi/uCO93zBgluE18dbZlgGCHuTRGfStwZa1EMr+Jyoufj62arn
9pW1hTdX3FM6I/Wfn+NvZftZq5UaFPczWPfsinPaUHV1/J8gGvtP0gEyDlKOjnVa
5PjFKcuUbez8FoWRlb/z2+ba0Npp78kGPdepvBUpLW643zY3fkM=
=d5yK
-----END PGP SIGNATURE-----