Created
November 17, 2015 14:12
-
-
Save barnumbirr/b46916b89a5bfdebe81b to your computer and use it in GitHub Desktop.
sigwaitinfo() stub for OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* sigwaitinfo() stub for OS X | |
* | |
* Reimplements a simple version of sigwaitinfo() ignoring its info | |
* parameter, on top of OS X's sigwait(). | |
*/ | |
#include <signal.h> | |
int sigwaitinfo(const sigset_t *set, siginfo_t *info) | |
{ | |
int sig = -1; | |
if ( sigwait(set, &sig) < 0 ) | |
return -1; | |
return sig; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment