Skip to content

Instantly share code, notes, and snippets.

@barnumbirr
Created November 17, 2015 14:12
Show Gist options
  • Save barnumbirr/b46916b89a5bfdebe81b to your computer and use it in GitHub Desktop.
Save barnumbirr/b46916b89a5bfdebe81b to your computer and use it in GitHub Desktop.
sigwaitinfo() stub for OS X
/**
* 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