mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-03 04:23:42 -05:00
Workaround lack of sigwaitinfo() on OpenBSD.
This commit is contained in:
parent
d83f0531d6
commit
043a67d062
1 changed files with 7 additions and 0 deletions
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue