| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Date: | Tue, 20 Sep 2005 17:03:08 -0700 |
| From: | Yitzchak Scott-Thoennes <sthoenna AT efn DOT org> |
| To: | cygwin AT cygwin DOT com |
| Subject: | SA_SIGINFO seems to be ignored |
| Message-ID: | <20050921000308.GA2920@efn.org> |
| Mime-Version: | 1.0 |
| User-Agent: | Mutt/1.4.2.1i |
| X-IsSubscribed: | yes |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |