supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Re: New reboot flag: -c for 'power cycle'
       [not found]   ` <bf3a7bb6-94e3-91f9-b61a-f6ab04c952f3@NTLWorld.COM>
@ 2017-10-29  8:37     ` Jonathan de Boyne Pollard
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan de Boyne Pollard @ 2017-10-29  8:37 UTC (permalink / raw)
  To: systemd Mailing List, Supervision
  Cc: Joachim Nilsson, Felix von Leitner, Warner Losh

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.

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

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

* Re: New reboot flag: -c for 'power cycle'
       [not found] ` <CANCZdfo8wFQh=aia6=HgtawYiV+mXYvWLoiJsZf1SqRa3ds36g@mail.gmail.com>
@ 2017-10-29  6:23   ` Jonathan de Boyne Pollard via freebsd-hackers
       [not found]   ` <bf3a7bb6-94e3-91f9-b61a-f6ab04c952f3@NTLWorld.COM>
  1 sibling, 0 replies; 2+ messages in thread
From: Jonathan de Boyne Pollard via freebsd-hackers @ 2017-10-29  6:23 UTC (permalink / raw)
  To: FreeBSD Arch, FreeBSD Hackers; +Cc: Supervision

Warner Losh:

> I was completely unaware of SIGWINCH being used like this on Linux. It 
> didn't pop up in the quick research I did before implementing this.
>
> But it would have been nice to know this sooner, but I'm OK with later 
> since it isn't much later.
>

Some sources of information for you, and for anyone else interested:

* The "System event response" section of my system-manager(1). 
(http://jdebp.eu./Softwares/nosh/guide/system-manager.html or 
file:///usr/local/share/doc/nosh/system-manager.html if you have the 
nosh Guide installed)

* The SIGNALS section of Miquel van Smoorenburg's init(8). 
(http://svn.savannah.gnu.org/viewvc/sysvinit/sysvinit/trunk/man/init.8)

* The SIGNALS section of Gerrit Pape's runit(8). 
(http://smarden.org/runit/runit.8.html)

* The SIGNALS section of systemd(8). 
(https://www.freedesktop.org/software/systemd/man/systemd.html)

* The doco for signal handling in Joachim Nilsson's finit. 
(https://github.com/troglobit/finit/blob/master/doc/signals.md)

* Felix von Leitner (2004-09).  Speeding up the Linux boot process with 
minit. https://www.fefe.de/minit/minit-linux-kongress2004.pdf.  11th 
Linux Kongress.  p. 14.

* https://unix.stackexchange.com/a/191875/5132

* https://unix.stackexchange.com/a/197472/5132

* https://www.mail-archive.com/supervision@list.skarnet.org/msg01344.html

_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


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

end of thread, other threads:[~2017-10-29  8:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <01741ade-cd76-3e7a-2b75-0d9984a6ee90@NTLWorld.COM>
     [not found] ` <CANCZdfo8wFQh=aia6=HgtawYiV+mXYvWLoiJsZf1SqRa3ds36g@mail.gmail.com>
2017-10-29  6:23   ` New reboot flag: -c for 'power cycle' Jonathan de Boyne Pollard via freebsd-hackers
     [not found]   ` <bf3a7bb6-94e3-91f9-b61a-f6ab04c952f3@NTLWorld.COM>
2017-10-29  8:37     ` Jonathan de Boyne Pollard

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