Re: Signals

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

 



Hello, 

Nothing happens to the execution context of the interrupted process. All the 
regs are saved, and restored when the signal handler exits and the original 
process gets rescheduled. That's what makes an asynch interrupt different 
from a subroutine call. With subs, which are synchronous, you can have a 
protocol which says who will manage the registers. With an interrupt, which 
is asynchronous, it really must be the interrupt function's proxy code. 

And it is easy to find out what you can/can't do inside a handler. Look for 
something about async signal safety in the man pages. Most linuxthreads 
stuff is out of the question, but most kernel objects work as far as I know. 
It is best to just set a flag and let processing be done elsewhere, if 
possible. 

I'd look at "Advanced Programming in the Unix Enviroment", or "Practical 
Unix Programming". 

HTH 

Don 

Anjaneyulu writes: 

> Hi,
> I would like to know when the signal handler will be executed on reception of a signal. 
> 
> What happens to the process (which installed the signal handler) execution context???? 
> 
> Can anyone specify what all can be performed in a signal handler???? 
> 
> Thanks in advance.
 
--
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