Subject: signal handling (newbie question)
From: [email-masked] (Prof John Gough)

29 Apr 1997 22:53:32 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Original-To: [email-masked]
Original-Sender: [email-masked]

Hi folks
sorry if this is a silly question, but I am porting of the gardens point
compilers --
	http://sky.fit.qut.edu.au/CompSci/PLAS/GPM/
to cygwin.  Everything works fine, except for that part of our
runtime-support provided error reporting which requires trap handling.
Soon as I get this going I will release the new versions.

If someone can tell me how to get the following canonical example to work,
I can take it from there.  Currently it just hangs in the system provided
exception handler --
(sigtest.exe 1000) In cygwin_except_handler

/* example of using simple signal handling */

#include <stdio.h>
#include <signal.h>

static void gotcha(int i)
{
        (void) signal(SIGSEGV,SIG_DFL);
        printf("gotcha caught one\n");
        exit(1);
}

int main(void)
{
        int i, *p = 0;
        (void) signal(SIGSEGV,gotcha);
        i = *p;
}

Many of our versions use sigaction rather than signal.  This doesn't
work either. 

Thanx in advance.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
K John Gough                      Internet:     [email-masked]
                                  http://www.dstc.qut.edu.au/~gough/
Automata      _--_|\              Faculty of Information Technology
rules OK     /      QUT           Queensland University of Technology
             \_.--._/             Box 2434  Brisbane 4001  AUSTRALIA
                   v              Phone: +61 7 3864-2111

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".