Signal handlers

Rahul Gandhi rahul.rahulgags at gmail.com
Sun Mar 31 13:33:48 EDT 2013


Hey!

I am still a newbie to kernel development. I was reading about signals and
signal handlers. The signal function describe as follows:

sighandler_t *signal* (int signum, sighandler_t action)

As per my understanding, when the signal denoted by signum occurs/is
raised, the action is taken which can be either SIG_DFL, SIG_IGN or a
function/handler. What i don't understand is, when we write for
example signal(SIGPROF,
handler); isn't this supposed to be asynchronous? however the code is
executed sequentially. So, when this function is encountered, it is
executed and when a signal is raised, how does it know what to do?

This might sound foolish, bear with me.

Thanks
Rahul Gandhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130331/194ef66c/attachment.html 


More information about the Kernelnewbies mailing list