|
libuev
|
Linux signalfd(2). More...
#include <errno.h>#include <signal.h>#include <sys/signalfd.h>#include <unistd.h>#include "uev.h"
Functions | |
| int | uev_signal_init (uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int signo) |
| Create a signal watcher. More... | |
| int | uev_signal_set (uev_t *w, int signo) |
| Reset a signal watcher. More... | |
| int | uev_signal_start (uev_t *w) |
| Start a stopped signal watcher. More... | |
| int | uev_signal_stop (uev_t *w) |
| Stop a signal watcher. More... | |
Linux signalfd(2).
Notice how uev::siginfo returns a struct signalfd_siginfo with useful data on the sender of the signal, this information is only available to signal callbacks.
Create a signal watcher.
| ctx | A valid libuEv context |
| w | Pointer to an uev_t watcher |
| cb | Signal callback |
| arg | Optional callback argument |
| signo | Signal to watch for |
errno set on error. | int uev_signal_set | ( | uev_t * | w, |
| int | signo | ||
| ) |
Reset a signal watcher.
| w | Watcher to reset |
| signo | New signal to watch for |
errno set on error. | int uev_signal_start | ( | uev_t * | w | ) |
Start a stopped signal watcher.
| w | Watcher to start (again) |
errno set on error. | int uev_signal_stop | ( | uev_t * | w | ) |
Stop a signal watcher.
| w | Watcher to stop |
errno set on error.
1.8.13