delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/08/31/06:58:26

From: Ian AT kiwiplan DOT co DOT nz (Ian Collins)
Subject: Signal Handling
31 Aug 1997 06:58:26 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <07551A47EAD6D01186430060B025C6F40A6C9B.cygnus.gnu-win32@modem1.kiwiplan2.co.nz>
Mime-Version: 1.0
Original-To: "'Gnu win32 mailer'" <gnu-win32 AT cygnus DOT com>
X-Priority: 3
X-Mailer: Internet Mail Service (5.0.1457.3)
Original-Sender: owner-gnu-win32 AT cygnus DOT com

My signal handling is not functioning as expected under gnu-win32.

I notice that if in a read, when a signal (e.g, a SIGALRM) triggers, the
signal handler is run, and then control is passed back to the read,
which just carries on.
It is expected that after a signal has been triggored and the handler
run, then the read should return.

I have tried this using both,

struct sigaction vec;
vec.sa_handler = myroutinename;
if (sigemptyset(*vec.sa_mask) == -1) return -1;
vec.sa_flags = SIG_INTERRUPT;
if (sigaction(SIGALRM, &vec, NULL) == -1) return -1;
alarm(10);

and,

if (signal(SIGALRM, myroutinename) == SIG_ERR) return -1;
alarm(10);

Many Regards,
Ian Collins

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019