Re: Sysrq and SIGTERM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carles Pina i Estany wrote:
>
> I have done a program who gets all signals (it should get only SIGTERM,
> just in case there is some other important signal...):
> 
> for (i=0;i<50;i++) {
>         signal(i,catch_int);
> }
> 
> In catch_int I write to file something to know that have been there.
> 
> Using Alt+Req+e works fine...
> 
> Then I have done a Kernel module, Kernel that only do:
> 
> printk("hello\n");
> panic("test panic\n");
> 
> when its loaded.
> 
> Then I execute the program who gets the signals, after it I load the
> kernel module. I have a Kernel panic, and then I press Alt+SysReq+e (and
> then to key to syncronize, unmount, syncronize, and boot). 
> 
> But it seems that the program who gets the signal, doesn't write to the
> file, as it does when there aren't the Kernel Panic. 

That is because the system has paniced.  That's game over.  The end.
Your program (or any others) are not going to ever run again (till
you reboot the box).  You don't really have much of a kernel running
anymore either.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux