Disabling handle signals was causing compile errors, and it was trying
to poll the signalfd even though it wasn't set up.
---
src/wayout.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/wayout.c b/src/wayout.c
index 4844844..ef51b92 100644
--- a/src/wayout.c
+++ b/src/wayout.c
@@ -466,6 +466,10 @@ static void app_run (struct App *app)
"ERROR: signalfd: %s\n", strerror(errno));
goto error;
}
+#else
+ fds[signal_fd].events = 0;
+ fds[signal_fd].revents = 0;
+ fds[signal_fd].fd = -1;
#endif
char buffer[BUFFERSIZE];
@@ -595,8 +599,8 @@ static void app_run (struct App *app)
printlog(app, 1, "[main] Received SIGUSR; Forcing update.\n");
update(app);
}
-
}
+#endif
if ((first_update) || (fds[timer_fd].revents & POLLIN)) {
if (app->ready) {
@@ -610,14 +614,13 @@ static void app_run (struct App *app)
printlog(app, 3, "App not ready yet.\n");
}
}
-#endif
}
return;
error:
app->ret = EXIT_FAILURE;
-#ifdef HANDLE_SIGNALS
exit:
+#ifdef HANDLE_SIGNALS
if ( fds[signal_fd].fd != -1 )
close(fds[signal_fd].fd);
#endif
--
2.37.3