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 <[email protected]>

Raimo Vuonnala <[email protected]>


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 Wed Sep 30 22:01:20 2009 for libtime/clockd by  doxygen 1.5.6