CARVIEW |
Select Language
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 23 Jul 2025 02:57:47 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
ETag: W/"5fa3-QhKHjxwFKWmxSZz7KbpmCJg62p0"
Content-Encoding: gzip
Some running environments use signals to inform running processes of certain events. These events may be related to errors performed by the program code, like a wrong arithmetical operation or to exceptional situations, such as a request to interrupt the program.
Signals generally represent situations where the program has either been requested to terminate or an unrecoverable error has happened, therefore handling a signal allows for either perform pre-termination cleanup operations or try to recover from the error in some way.
Not all running environments are required to generate automatic signals in the cases for which they are designed in the standard C library, and some other environments not only generate these but also many more specific signals. But in any case, all signals generated explicitly with a call to function raise are delivered to its corresponding signal handler.
See function signal for more information.
Reference
C library:
- <cassert> (assert.h)
- <cctype> (ctype.h)
- <cerrno> (errno.h)
-
<cfenv> (fenv.h)C++11
- <cfloat> (float.h)
-
<cinttypes> (inttypes.h)C++11
- <ciso646> (iso646.h)
- <climits> (limits.h)
- <clocale> (locale.h)
- <cmath> (math.h)
- <csetjmp> (setjmp.h)
- <csignal> (signal.h)
- <cstdarg> (stdarg.h)
-
<cstdbool> (stdbool.h)C++11
- <cstddef> (stddef.h)
-
<cstdint> (stdint.h)C++11
- <cstdio> (stdio.h)
- <cstdlib> (stdlib.h)
- <cstring> (string.h)
-
<ctgmath> (tgmath.h)C++11
- <ctime> (time.h)
-
<cuchar> (uchar.h)C++11
- <cwchar> (wchar.h)
- <cwctype> (wctype.h)
Containers:
-
<array>C++11
- <deque>
-
<forward_list>C++11
- <list>
- <map>
- <queue>
- <set>
- <stack>
-
<unordered_map>C++11
-
<unordered_set>C++11
- <vector>
-
Input/Output:
Multi-threading:
-
<atomic>C++11
-
<condition_variable>C++11
-
<future>C++11
-
<mutex>C++11
-
<thread>C++11
-
Other:
- <algorithm>
- <bitset>
-
<chrono>C++11
-
<codecvt>C++11
- <complex>
- <exception>
- <functional>
-
<initializer_list>C++11
- <iterator>
- <limits>
- <locale>
- <memory>
- <new>
- <numeric>
-
<random>C++11
-
<ratio>C++11
-
<regex>C++11
- <stdexcept>
- <string>
-
<system_error>C++11
-
<tuple>C++11
-
<type_traits>C++11
-
<typeindex>C++11
- <typeinfo>
- <utility>
- <valarray>
<csignal> (signal.h)
functions
types
- Reference
- <csignal>
header
<csignal> (signal.h)
C library to handle signals
Signals generally represent situations where the program has either been requested to terminate or an unrecoverable error has happened, therefore handling a signal allows for either perform pre-termination cleanup operations or try to recover from the error in some way.
Not all running environments are required to generate automatic signals in the cases for which they are designed in the standard C library, and some other environments not only generate these but also many more specific signals. But in any case, all signals generated explicitly with a call to function raise are delivered to its corresponding signal handler.
Functions
- signal
- Set function to handle signal (function)
- raise
- Generates a signal (function)
Types
- sig_atomic_t
- Integral type (type)
Macro constants
type | macro | signal |
---|---|---|
int
(signals) | SIGABRT | (Signal Abort) Abnormal termination, such as is initiated by the abort function. |
SIGFPE | (Signal Floating-Point Exception) Erroneous arithmetic operation, such as zero divide or an operation resulting in overflow (not necessarily with a floating-point operation). | |
SIGILL | (Signal Illegal Instruction) Invalid function image, such as an illegal instruction. This is generally due to a corruption in the code or to an attempt to execute data. | |
SIGINT | (Signal Interrupt) Interactive attention signal. Generally generated by the application user. | |
SIGSEGV | (Signal Segmentation Violation) Invalid access to storage: When a program tries to read or write outside the memory it has allocated. | |
SIGTERM | (Signal Terminate) Termination request sent to program. | |
functions (handlers) | SIG_DFL | Default handling: The signal is handled by the default action for that particular signal. |
SIG_IGN | Ignore Signal: The signal is ignored. | |
SIG_ERR | Special return value indicating failure. |
See function signal for more information.
Home page | Privacy policy
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us