The keyboard signal can actually be set to any signal less than or equal to NSIG with the KDSIGACCEPT ioctl. sysvinit just happened to pick SIGWINCH for that, and so did systemd and nosh, presumably for compatibility.
El dom., 23 feb. 2020 a las 20:53, Laurent Bercot escribió: > > Both SIGPWR and SIGWINCH are caught in the latest s6 git head. > > Release coming whenever real life stop throwing things at me and I > can actually find a week-end to polish things and cut it. I noticed that you modified s6-svscan to divert SIGPWR and SIGWINCH, but s6-linux-init-maker only creates a handler for SIGPWR (that just does 's6-inux-init-shutdown -a -p -- now', like the SIGUSR1 handler). If you bothered making SIGWINCH 'divertable', you could also add the KDSIGACCEPT ioctl() call to the stage1 init (s6-linux-init), just like you did with the reboot(RB_DISABLE_CAD) call, and have s6-linux-init-maker create a run-image/service/.s6-svscan/SIGWINCH file. My suggested action for SIGWINCH would be to execute a file in the 'scripts' subdirectory of the basedir. The skeldir counterpart of this file could be a shell script with only explanatory comments, just like the skeldir's rc.shutdown.final (so, by default, unless the administrator configures something, the keyboard signal would do nothing). Since the inittab action field for the keyboard signal is "kbrequest", the target unit that systemd starts in response to the keyboard signal is named "kbrequest.target", and the target bundle that nosh's system-manager starts in response to the keyboard signal is named "kbrequest", my extremely original suggestion for the script's name would be... "kbrequest" :) (Actually, for sysvinit, systemd and nosh, the action in response to SIGPWR is also configurable, and by default SIGPWR does nothing, so I don't know what LXC containers do if they include an init system… they must have some extra configuration I guess). G.