From 043a67d0624d4ff349e3146434677e837aa427e8 Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Sun, 3 Jan 2016 20:49:13 +0100 Subject: [PATCH] Workaround lack of sigwaitinfo() on OpenBSD. --- source/rofi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/rofi.c b/source/rofi.c index 8c058c64..0c6f388c 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -2244,11 +2244,18 @@ static gpointer rofi_signal_handler_process ( gpointer arg ) sigaddset ( &set, SIGUSR1 ); // loop forever. while ( 1 ) { +#ifdef __OpenBSD__ + int sig = 0; + if ( sigwait ( &set, &sig ) < 0 ) { + perror ( "sigwaitinfo failed, lets restart" ); + } +#else siginfo_t info; int sig = sigwaitinfo ( &set, &info ); if ( sig < 0 ) { perror ( "sigwaitinfo failed, lets restart" ); } +#endif else { // Send message to main thread. if ( sig == SIGHUP ) {