signal handling support in cywgin ??

6 views
Skip to first unread message

Vipin

unread,
Jun 24, 2009, 11:31:35 AM6/24/09
to cygwin-easy
Is the signal support complete in Cygwin.
I am compiling the following piece of code but getting

"parse error before siginfo_t"

checked that in <sys/signal.h> sigaction is defined but "siginfo_t" is
not defined anywhere.

Is the support for signals complete in Cygwin ???
What can be the solution for this ??

Thanks
vipn


/* --------------------Sample code ----------------------*/
void OnRecvSigFromLic(int signum, siginfo_t *info, void *data){
/* do nothing */
}


void RegSigFnFromLic(void)
{
struct sigaction handle;
sigset_t blocked;
handle.sa_sigaction = (void*)OnRecvSigFromLic;

sigemptyset(&blocked);
handle.sa_mask = blocked;
handle.sa_flags |= SA_SIGINFO;

if(sigaction(SIGUSR1, &handle, NULL) == -1)
perror("sigaction\n");

}


int main (nt argc, char *argv[]){
RegSigFnFromLic();
}
Reply all
Reply to author
Forward
0 new messages