aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/signal.c
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-06-13 01:50:24 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2023-06-13 01:50:24 +0200
commit5b58c9fd2880911aa926259d97a396e97f3d4313 (patch)
treefefbc7a72447f2f12adbe0e16d6f597cf05e3fdf /src/signal.c
parentuse signalfd to stop on SIGTERM (diff)
downloadcimple-5b58c9fd2880911aa926259d97a396e97f3d4313.tar.gz
cimple-5b58c9fd2880911aa926259d97a396e97f3d4313.zip
event_loop: hide the API details
Diffstat (limited to '')
-rw-r--r--src/signal.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/signal.c b/src/signal.c
index 9f788b2..2c80c85 100644
--- a/src/signal.c
+++ b/src/signal.c
@@ -131,9 +131,7 @@ void signalfd_destroy(int fd)
file_close(fd);
}
-int signalfd_add_to_event_loop(int fd, struct event_loop *loop, event_loop_handler handler,
- void *arg)
+int signalfd_add_to_event_loop(int fd, struct event_loop *loop, event_handler handler, void *arg)
{
- struct event_fd entry = {.fd = fd, .events = POLLIN, .handler = handler, .arg = arg};
- return event_loop_add(loop, &entry);
+ return event_loop_add(loop, fd, POLLIN, handler, arg);
}