aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
Diffstat (limited to 'util-src')
-rw-r--r--util-src/signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/util-src/signal.c b/util-src/signal.c
index ef35067b..76d25d6f 100644
--- a/util-src/signal.c
+++ b/util-src/signal.c
@@ -384,7 +384,10 @@ static int l_signalfd(lua_State *L) {
sigemptyset(&sfd->mask);
sigaddset(&sfd->mask, luaL_checkinteger(L, 1));
- sigprocmask(SIG_BLOCK, &sfd->mask, NULL); /* TODO check err */
+ if (sigprocmask(SIG_BLOCK, &sfd->mask, NULL) != 0) {
+ lua_pushnil(L);
+ return 1;
+ };
sfd->fd = signalfd(-1, &sfd->mask, SFD_NONBLOCK);