Re: New reboot flag: -c for 'power cycle'

From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups_at_NTLWorld.COM>
Date: Sun, 29 Oct 2017 08:37:07 +0000

Warner Losh, FreeBSD and embedded systems developer, has just invented a
new shutdowngoal, in addition to the ones that we already know. In
addition to the conventional reset, power off, halt, and kexec goals; xe
has added a power-off-and-then-on-again goal. Xe has named it power
cycle, and its use case is systems with hardware that can trigger a full
power cycle under the kernel's controland where an ACPI reset or even an
EFI ResetSystem() of type EfiResetColdjust do not cutthe mustard.

It involvesanew flag to the FreeBSD reboot() system call, RB_POWERCYCLE;
new FreeBSD kernel functionality for enacting this with hardwares that
support it; new -c (for "cycle") flags to the various reboot, halt,
poweroff, and shutdown commands; and a new signal sent to process #1.

* https://marc.info/?l=freebsd-arch&m=150886821625848&w=2

* https://reviews.freebsd.org/D12777

This of course impacts those of us who write process #1 programs.

Since SIGWINCH to process #1 is already taken by Linux, I have adjusted
my softwares to use SIGRTMIN+7 and SIGRTMIN+17 for the signals to
process #1 for this, ready for when Linux eventually catches up with
this idea. (-:

(There is an on-going discussion of whether FreeBSD's old init program
should use real-time signals, too. It currently does not.But that is a
side issue here. I have also added to my softwares powercycle and
fastpowercycle commands and subcommands, a "c" or "C" argument to the
compatibility telinit program (by analogy to the existing letters,
although I might have to pick another letter), a powercycle target
(again by analogy to existing targets), and a --powercycle long option
equivalent for -c .)

Please do not use SIGRTMIN+7 and SIGRTMIN+17 for an incompatible purpose.
Received on Sun Oct 29 2017 - 08:37:07 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC