This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/signal.c

16 lines
303 B
C
Raw Permalink Normal View History

#include <signal.h>
sig_atomic_t signal_count;
void MyHandler( int sig_number )
{
++signal_count;
}
void main()
{
signal( SIGFPE, MyHandler ); /* set own handler */
signal( SIGABRT, SIG_DFL ); /* Default action */
signal( SIGFPE, SIG_IGN ); /* Ignore condition */
}