server 0.0.1
basicserverinfrastructure

src/signalHandling.c File Reference

#include <signal.h>
Include dependency graph for signalHandling.c:

Go to the source code of this file.

Functions

void terminate (int signum)
void init_signals (void)

Variables

volatile int doShutdown

Function Documentation

void init_signals ( void  )

Definition at line 14 of file signalHandling.c.

{
    signal(SIGTERM, terminate);
    signal(SIGHUP, SIG_IGN);
    signal(SIGINT, terminate);
    signal(SIGQUIT, terminate);
    signal(SIGABRT, terminate);
    signal(SIGALRM, SIG_IGN);
    signal(SIGURG, SIG_IGN);

    signal(SIGPIPE, SIG_IGN);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void terminate ( int  signum)

Definition at line 5 of file signalHandling.c.

{
    signal(signum, SIG_IGN);
    /*
     * @TODO do logging here
     */
    doShutdown = 1;
}

Here is the caller graph for this function:


Variable Documentation

volatile int doShutdown

Definition at line 3 of file signalHandling.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines