Sysrq and SIGTERM

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

 



Hello list!

I have a question, half-about kernel, half-about system administration. I
hope that it is not off-topic... I have just subscribed here :-)

I have been playing with System Request keys, and I have some little
problem.

I enabled it, and using Alt+ReqSys+e kills everything (for example, the
shell that I am). 

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. 

I think that the point of SysReq is to close the files, write the state
of programs, etc. to disk. But it is not happening with my "stupid"
example... Why?

I am not disconnect disk to force Kernel Panic. It is a soft Kernel
Panic...

I think that Kernel version is 2.6.16 but I am not sure. It was not my
computer, I will not try it now :-)

Thank you very much!

-- 
Carles Pina i Estany		GPG id: 0x8CBDAE64
	http://pinux.info	Manresa - Barcelona

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