On 11/06/2015 23:34, Steve Litt wrote:
> I have a feeling that SIGINT isn't getting all the way to PID1. When I
> do the following:
>
> kill -s SIGINT 1
>
> It runs rc.shutdown with the argument "reboot" and reboots the system,
> just like it's supposed to. But when I press Ctrl+Alt+Del at a virtual
> terminal, it doesn't. That makes me suspect that either Ctrl+Alt+Del is
> sending a different interrupt to PID 1, or the SIGINT it's sending
> isn't getting to PID 1.
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.
Second, when you press Ctrl-Alt-Del, it's not guaranteed that it
will go straight to the kernel. Search "ctrl-alt-del:" in
https://www.kernel.org/doc/Documentation/sysctl/kernel.txt for some
details.
But if the kernel actually receives it, it's definitely a SIGINT
that it will send to pid 1.
--
Laurent
Received on Thu Jun 11 2015 - 22:56:54 UTC