Lely core libraries 2.3.4
|
This header file is part of the I/O library; it contains the system signal handler declarations. More...
Go to the source code of this file.
Functions | |
io_sigset_t * | io_sigset_create (io_poll_t *poll, ev_exec_t *exec) |
Creates a new system signal handler. More... | |
void | io_sigset_destroy (io_sigset_t *sigset) |
Destroys a system signal handler. More... | |
This header file is part of the I/O library; it contains the system signal handler declarations.
On Windows, only SIGINT, SIGBREAK and SIGHUP can be monitored. SIGINT and SIGBREAK are delivered when the user presses Ctrl+C and Ctrl+Break, respectively, but they can also be generated by GenerateConsoleCtrlEvent()
. SIGHUP is raised when the user closes the console. After this signal is delivered, the process has a few seconds to respond before it is terminated. Signals raised with raise()
or abort()
are not caught by the signal handler.
On POSIX platforms it is possible to monitor any defined signal except SIGKILL and SIGSTOP, which cannot be caught. SIGABRT can only be caught if it was raised explicitly with raise()
or pthread_kill()
. If raised by abort()
, the process will terminate once the (internal) signal handler returns. Unless raised explicitly, monitoring SIGBUS, SIGFPE, SIGILL or SIGSEGV can lead to undefined behavior, since wait operations are processed asynchronously and do not allow the user to meaningfully respond to the error that triggered the signal. Use sigaction()
to handle those signals.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file sigset.h.
io_sigset_t * io_sigset_create | ( | io_poll_t * | poll, |
ev_exec_t * | exec | ||
) |
Creates a new system signal handler.
poll | a pointer to the I/O polling instance used to monitor signal events. |
exec | a pointer to the executor used to execute asynchronous tasks. |
void io_sigset_destroy | ( | io_sigset_t * | sigset | ) |
Destroys a system signal handler.