Signals: Difference between revisions

From OSDev.wiki
Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content added Content deleted
No edit summary
(Formatted and Moved from PFR into Stubs.)
Line 1: Line 1:
{{Convert}}
{{Stub}}


Signals are a Unix invention for asynchronous signaling, and were integrated into the C standard (<signal.h>). When a process receives a signal (send by hardware, or another process using <tt>raise()</tt>), a ''signal handler'' is called. A signal handler is a C function that handles the signal; which function to call on which signal is defined by passing its function pointer to the <tt>signal()</tt> function. (If no signal handler is defined for a given signal, a <tt>raise()</tt> of that signal aborts the program.)
Signals are a Unix invention for asynchronous signaling, and were integrated into the C standard (<signal.h>). When a process receives a signal (send by hardware, or another process using <tt>raise()</tt>), a ''signal handler'' is called. A signal handler is a C function that handles the signal; which function to call on which signal is defined by passing its function pointer to the <tt>signal()</tt> function. (If no signal handler is defined for a given signal, a <tt>raise()</tt> of that signal aborts the program.)


==Handling==
Signal handling is ''tricky'', since it breaks the single-control-flow structure of a C program. Make sure you read the manuals...
Signal handling is ''tricky'', since it breaks the single-control-flow structure of a C program. Make sure you read the manuals.

==See Also==
*[http://www.linuxjournal.com/article/3985 The Linux Signals Handling Model]
*[http://users.actcom.co.il/~choo/lupg/tutorials/signals/signals-programming.html Introduction to Unix Signals Programming]


[[Category:IPC]]
[[Category:IPC]]

Revision as of 22:53, 10 July 2007

This page is a stub.
You can help the wiki by accurately adding more contents to it.

Signals are a Unix invention for asynchronous signaling, and were integrated into the C standard (<signal.h>). When a process receives a signal (send by hardware, or another process using raise()), a signal handler is called. A signal handler is a C function that handles the signal; which function to call on which signal is defined by passing its function pointer to the signal() function. (If no signal handler is defined for a given signal, a raise() of that signal aborts the program.)

Handling

Signal handling is tricky, since it breaks the single-control-flow structure of a C program. Make sure you read the manuals.

See Also