mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-18 10:39:31 +00:00
Update signal example with siginfo
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
e20d37228d
commit
3d8ec02267
1 file changed
+4
-1
@@ -122,7 +122,10 @@ Here is a signal example:
|
||||
void cleanup_exit(uev_t *w, void *arg, int events)
|
||||
{
|
||||
if (UEV_ERROR == events)
|
||||
puts("Ignoring signal watcher error ...");
|
||||
puts("Ignoring signal watcher error ...");
|
||||
else
|
||||
printf("Got signal (signo %d) from PID %d\n",
|
||||
w->siginfo.ssi_signo, w->siginfo.ssi_pid);
|
||||
|
||||
/* Graceful exit, with optional cleanup ... */
|
||||
uev_exit(w->ctx);
|
||||
|
||||
Reference in new issue
Block a user