sighnd.c File Reference

init clockd signals More...

#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include "logging.h"
#include "mainloop.h"
#include "sighnd.h"

Functions

static void sighnd_terminate (void)
static void sighnd_handler (int sig)
void sighnd_setup (void)


Detailed Description

This initializes clockd signal handler.

Copyright (C) 2008 Nokia. All rights reserved.

Author:
Simo Piiroinen <simo.piiroinen@nokia.com>

Raimo Vuonnala <raimo.vuonnala@nokia.com>


Function Documentation

static void sighnd_terminate ( void   )  [static]

Handle clockd terminate signal.

Todo:
: is it safe to call g_main_loop_quit() from signal handler?

Referenced by sighnd_handler().

static void sighnd_handler ( int  sig  )  [static]

Internal signal helper function which is called when process is signalled. This is needed just for breaking away from while loop in main() function.

Referenced by sighnd_setup().

void sighnd_setup ( void   ) 

Setup signals as follows:

  • SIGUP: do nothing
  • SIGUSR1: toggle debug mode
  • SIGINT, SIGQUIT, SIGTERM: terminate clockd

Referenced by mainloop_run().


Generated on Mon Jun 21 15:45:53 2010 for clockd by  doxygen 1.5.6