3 /* signal( int sig, void (*func)( int ) )
5 This file is part of the Public Domain C Library (PDCLib).
6 Permission is granted to use, modify, and / or redistribute at will.
15 void (*_PDCLIB_sigabrt)( int ) = SIG_DFL;
16 void (*_PDCLIB_sigfpe)( int ) = SIG_DFL;
17 void (*_PDCLIB_sigill)( int ) = SIG_DFL;
18 void (*_PDCLIB_sigint)( int ) = SIG_DFL;
19 void (*_PDCLIB_sigsegv)( int ) = SIG_DFL;
20 void (*_PDCLIB_sigterm)( int ) = SIG_DFL;
22 void (*signal( int sig, void (*func)( int ) ) )( int )
24 void (*oldhandler)( int );
25 if ( sig <= 0 || func == SIG_ERR )
32 oldhandler = _PDCLIB_sigabrt;
33 _PDCLIB_sigabrt = func;
36 oldhandler = _PDCLIB_sigfpe;
37 _PDCLIB_sigfpe = func;
40 oldhandler = _PDCLIB_sigill;
41 _PDCLIB_sigill = func;
44 oldhandler = _PDCLIB_sigint;
45 _PDCLIB_sigint = func;
48 oldhandler = _PDCLIB_sigsegv;
49 _PDCLIB_sigsegv = func;
52 oldhandler = _PDCLIB_sigterm;
53 _PDCLIB_sigterm = func;
65 #include <_PDCLIB_test.h>
69 /* Testing covered by raise.c */