#ifndef SIGCAT_H #define SIGCAT_H #include #include #include #include #include #include #define SIGMIN 1 #define SIGMAX 31 // Holds the current output stream FILE *outputStream; /* setup_default_handlers() * ------------------------ * Sets up handlers for signals 1-31 excluding 9, 19, 10 and 12 */ void setup_default_handlers(void); /* default_signal_handler() * ------------------------ * The default handler for signals, prints to the current output_stream * For example: sigcat recieved Hangup * * s: the signal number */ void default_signal_handler(int s); /* usr_signal_handler() * ------------------------ * The USR handler for signals, changes the output_stream based on the signal * recieved. SIGUSR1 sets the output_stream to stdout and SIGUSR2 sets the * output_stream to stderr * * s: the signal number */ void usr_signal_handler(int s); #endif