main.c revision 419cf63077e755935ce105747d6ebc67b7d38a7f
/* Copyright (C) 2005 Timo Sirainen */
#include "lib.h"
#include "lib-signals.h"
#include "ioloop.h"
#include "fd-close-on-exec.h"
#include "restrict-access.h"
#include "randgen.h"
#include "sql-api.h"
#include "dict.h"
#include "dict-client.h"
#include "dict-server.h"
#include "module-dir.h"
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
#define DICT_MASTER_LISTENER_FD 3
static struct dict_server *dict_server;
{
/* warn about being killed because of some signal, except SIGINT (^C)
which is too common at least while testing :) */
}
{
}
static void drop_privileges(void)
{
/* Log file or syslog opening probably requires roots */
chrooting. */
random_init();
/* Load built-in SQL drivers (if any) */
}
static void main_init(void)
{
const char *path;
int fd;
/* If master dies, the log fd gets closed and we'll quit */
}
static void main_deinit(void)
{
closelog();
}
int main(void)
{
#ifdef DEBUG
#endif
/* NOTE: we start rooted, so keep the code minimal until
restrict_access_by_env() is called */
lib_init();
main_init();
main_deinit();
lib_deinit();
return 0;
}