blob: f04b1b40c3f324636a66ca2335b7859a124c5e1a [file] [log] [blame]
#include <stdio.h>
#include <signal.h>
void sig_hdlr ( int signo )
{
printf ( "caught sig segv\n" );
exit(1);
}
int main ( void )
{
printf ( "installing sig handler\n" );
signal(SIGSEGV, sig_hdlr);
printf ( "doing bad thing\n" );
* (int*) 65536 = 0;
printf ( "exited normally ?!\n" );
return 0;
}