From 7be202d1db19581c8420af64b684829ae346f6cf Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Mon, 9 Oct 2023 13:36:39 -0400 Subject: Set signal mask and use ppoll --- kitd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kitd.c b/kitd.c index 2961820..d3dbe3b 100644 --- a/kitd.c +++ b/kitd.c @@ -157,6 +157,10 @@ int main(int argc, char *argv[]) { struct timeval interval = restart; signals[SIGALRM] = 1; + sigset_t mask, unmask; + sigfillset(&mask); + sigemptyset(&unmask); + sigprocmask(SIG_SETMASK, &mask, NULL); struct pollfd fds[2] = { { .fd = stdoutRW[0], .events = POLLIN }, { .fd = stderrRW[0], .events = POLLIN }, @@ -259,7 +263,7 @@ int main(int argc, char *argv[]) { signals[SIGINFO] = 0; } - int nfds = poll(fds, 2, -1); + int nfds = ppoll(fds, 2, NULL, &unmask); if (nfds < 0 && errno != EINTR) { syslog(LOG_ERR, "poll: %m"); continue; -- cgit 1.4.1 > summary refs log tree commit diff
path: root/bin/png.h (unfollow)
Commit message (Expand)Author
2019-07-14Add CSI names to shotty -dJune McEnroe
2019-07-14Ignore CSI tJune McEnroe
2019-07-14Add more info to shotty man pageJune McEnroe
2019-07-14Fix OSC PT handlingJune McEnroe
2019-07-14Handle OSC in shottyJune McEnroe
2019-07-14Add shotty -dJune McEnroe
2019-07-13Add shotty -cJune McEnroe
2019-07-13Add DL to shottyJune McEnroe
2019-07-12Color html rather than bodyJune McEnroe
2019-07-12Make author consistent and update URLsJune McEnroe
2019-07-12Move to www/text.causal.agencyJune McEnroe
2019-07-12Add new causal.agency with shotty shotsJune McEnroe
2019-07-12Use -s to infer terminal sizeJune McEnroe
2019-07-12Add DCH to shottyJune McEnroe
2019-07-12Support insert mode in shottyJune McEnroe
2019-07-11Don't do carriage return on line feedJune McEnroe
2019-07-11Interpret 256color-style SGRsJune McEnroe
2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe
2019-07-11Factor out clearJune McEnroe
2019-07-11Add bright option to shottyJune McEnroe
2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe
2019-07-10Ignore SM and RMJune McEnroe
2019-07-09Add shotty man page and build itJune McEnroe
2019-07-09Add up -cJune McEnroe
2019-07-09Add options for default colors to shottyJune McEnroe
2019-07-08Use char literals consistentlyJune McEnroe