mainloop.c File Reference

clockd mainloop More...

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <glib.h>
#include <signal.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include "logging.h"
#include "sighnd.h"
#include "server.h"
#include "mainloop.h"

Functions

int mainloop_stop (int force)
int mainloop_run (int argc, char *argv[])


Detailed Description

This initializes/deinitializes clockd:

Copyright (C) 2008 Nokia. All rights reserved.

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

Raimo Vuonnala <raimo.vuonnala@nokia.com>


Function Documentation

int mainloop_stop ( int  force  ) 

Quit the mainloop.

Parameters:
force If nonzero and no mainloop, exit the process with failure
Returns:
1 if success, 0 if fails (no mainloop)

Referenced by sighnd_terminate().

int mainloop_run ( int  argc,
char *  argv[] 
)

This is clockd mainloop.

Args:
-d enable debug mode

  • init signals
  • inits dbus (server)
  • starts g_mainloop

Parameters:
argc argc
argv argv
Returns:
0 if exited normally, nonzero if exit with failure.

Referenced by main().


Generated on Wed Jul 8 14:19:23 2009 for libtime/clockd by  doxygen 1.5.6