词条 | C signal handling | ||||||
释义 |
In the C Standard Library, signal processing defines how a program handles various signals while it executes. A signal can report some exceptional behavior within the program (such as division by zero), or a signal can report some asynchronous event outside the program (such as someone striking an interactive attention key on a keyboard). Standard signals{{also|Unix signal}}The C standard defines only 6 signals. They are all defined in
Additional signals may be specified in the HandlingA signal can be generated by calling A signal handler is a function which is called by the target environment when the corresponding signal occurs. The target environment suspends execution of the program until the signal handler returns or calls Signal handlers can be set be with If the signal reports an error within the program (and the signal is not asynchronous), the signal handler can terminate by calling Functions
Example usageSee also
References1. ^{{cite book | url=http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf | title=ISO/IEC 9899:1999 specification | at=p. 258, § 7.14 Signal handling}} {{Use dmy dates|date=January 2012}}2. ^{{cite web | url=http://pubs.opengroup.org/onlinepubs/007904975/ | title=The Open Group Base Specifications Issue 6 - signal.h - signals | accessdate=10 January 2012}} 3. ^https://www.cs.drexel.edu/cgi-bin/manServer.pl/signal.2 Signal(2) manpage 1 : C standard library |
||||||
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。