Date: Sat, 28 Oct 2017 15:51:43 +0100 From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> To: FreeBSD Arch <freebsd-arch@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: New reboot flag: -c for 'power cycle' Message-ID: <01741ade-cd76-3e7a-2b75-0d9984a6ee90@NTLWorld.COM>
next in thread | raw e-mail | index | archive | help
Warner Losh: > Since init has no controlling terminal, SIGWINCH is useless to it anyway. This is untrue for two reasons. First, for some years now the nosh toolset's system manager has been recognizing SIGWINCH on FreeBSD/TrueOS for Linux compatibility; as on Linux it is sent to process #1 in response to a kernel virtual terminal attention key sequence. Second, that argument is fallacious because it would also apply to controlling-terminal-generated signals such as SIGINT and clearly does not given that SIGINT is useful to process #1. So what I am doing in the nosh toolset for the forthcoming version 1.36 is this: * The compatibility shutdown command now sports a new -c/--powercycle option. * The compatibility reboot, halt, and poweroff commands now sport a new -c/--powercycle option, for the benefits of cruel system administrators. * There is a new compatibility fastpowercycle/powercycle command, with all of the same options for cruel system administrators. * system-manager now treats SIGWINCH differently on non-Linux operating systems, treading it as a request to invoke a new powercycle service. SIGRTMIN+6, unused in the systemd system, is the Linux equivalent. * system-manager now treats SIGRTMIN+16 as the underlying actual powercycle request, which it translates to either RB_POWERCYCLE if it is present in the C library headers, or RB_AUTOBOOT if it is not. * There is now a new system-control powercycle subcommand, which defaults to sending SIGWINCH/SIGRTMIN+6 or SIGRTMIN+16. * The system-control init subcommand now sports a new c/C argument, by analogy to h/H. This is of course thus reflected automatically in the compatibility telinit command and the initctl-read server.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01741ade-cd76-3e7a-2b75-0d9984a6ee90>