On Fri, 12 Jun 2015 00:56:54 +0200
Laurent Bercot <[email protected]> wrote:


>   It's Complicated (TM).
> 
>   First, you're not supposed to be able to send signals to process 1.
> Only the kernel can do that. So I'm surprised you managed to get it
> to work with a kill command, and I'm interested in the details.

Here are the details as I've observed them:

* Whole thing running in a VirtualBox VM

* Linux distro is Plop Linux Desktop,
  https://www.plop.at/en/ploplinux/desktop/index.html

* PID 1 is Suckless Init 0.9.2,  http://git.suckless.org/sinit. Upon
  receiving a SIGINT it's supposed to fork off (not
  exec) /bin/rc.shutdown. In fact, when you kill -s SIGINT 1, it
  runs /bin/rc.shutdown.

* On startup, after a few housekeepings, PID 1 forks off /bin/rc.init,
  which in my case does little besides remount read/write, run
  lk_prepare to prepare daemontools-encore to be brought up in specific
  order, and then runs svscanboot. All this appears to be done.


By the way, my Plop Linux boots up such
that /proc/sys/kernel/ctrl-alt-del has value 1. Changing it to 0
doesn't enable the three finger salute to run /bin/rc.shutdown reboot.
If I change it, it reverts to 1 after reboot.

SteveT

Steve Litt 
June 2015 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key

Reply via email to