This is the mail archive of the
cygwin
mailing list for the Cygwin project.
SA_SIGINFO seems to be ignored
- From: Yitzchak Scott-Thoennes <sthoenna at efn dot org>
- To: cygwin at cygwin dot com
- Date: Tue, 20 Sep 2005 17:03:08 -0700
- Subject: SA_SIGINFO seems to be ignored
signal.h defines SA_SIGINFO, but it doesn't seem to work; in the following
testcase, hiphup gets info passed as NULL.
#include <signal.h>
#include <stdio.h>
void hiphup(int signo, siginfo_t *info, void *context)
{
if (info == NULL) { printf("info NULL!\n"); return; }
printf("got signal\nsigno: %d, info->si_signo: %d\n",
signo, info->si_signo);
return;
}
int main(int argc, char **argv)
{
struct sigaction act;
act.sa_mask = 0;
act.sa_flags = SA_SIGINFO;
act.sa_sigaction = hiphup;
sigaction(SIGHUP, &act, NULL);
raise(SIGHUP);
return 0;
}
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/