summaryrefslogtreecommitdiff
path: root/src/unix_signal.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-15Replace our custom signalfd() fallback with glib one (available as of 2.54)Benjamin Franzke1-166/+0
Back in 2011 SIGWINCH couldn't be used with g_unix_signal_add. This has changed in 2.54 (released Sep. 2017). That means we can drop our wrapper now.
2020-02-15unix_signal: Fix ISO C90 warningBenjamin Franzke1-2/+2
unix_signal.c:140:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] GSource *source; ^
2020-02-15unix_signal: Fix warnings and notesBenjamin Franzke1-3/+13
Doesn't happen on linux, as we have signalfd there, but would be triggered for other operating systems. warning: missing braces around initializer [-Wmissing-braces] sigaction(signum, &(struct sigaction){handler}, NULL); ^ unix_signal.c:130:39: note: (near initialization for '(anonymous)') unix_signal.c:130:29: warning: missing initializer for field 'sa_mask' of 'struct sigaction' [-Wmissing-field-initializers] sigaction(signum, &(struct sigaction){handler}, NULL); ^
2011-10-22Add License header to source filesBenjamin Franzke1-0/+18
2011-10-22Fix 80 column widthBenjamin Franzke1-3/+6
2011-10-20Use signalfd if availableBenjamin Franzke1-1/+0
If kqueue can be added as well, our homegrown kinda ugly signal dispatcher could be killed.
2011-10-20g_unix_signal: Remove g_ prefix to not collide with glibBenjamin Franzke1-0/+136
There is a g_unix_signal_new function in glib as well now, but that is only allowed to be used for SIGINT, SIGHUP and SIGTERM, so we have to stay with our own.