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 );
28 oldhandler = _PDCLIB_sigabrt;
29 _PDCLIB_sigabrt = func;
32 oldhandler = _PDCLIB_sigfpe;
33 _PDCLIB_sigfpe = func;
36 oldhandler = _PDCLIB_sigill;
37 _PDCLIB_sigill = func;
40 oldhandler = _PDCLIB_sigint;
41 _PDCLIB_sigint = func;
44 oldhandler = _PDCLIB_sigsegv;
45 _PDCLIB_sigsegv = func;
48 oldhandler = _PDCLIB_sigterm;
49 _PDCLIB_sigterm = func;
52 /* The standard calls for an unspecified "positive value". You
53 will probably want to define a specific value for this.
64 #include <_PDCLIB_test.h>
68 TESTCASE( NO_TESTDRIVER );