Commit b24c9ffc authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(main): Initialize the statistics subsystem, and check the integrity

	of it during shutdown.
parent a2f0286f
/*
* $Id: ramkomd.c,v 0.116 2003/07/13 11:56:37 ceder Exp $
* $Id: ramkomd.c,v 0.117 2003/07/23 08:27:39 ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -107,6 +107,7 @@
# include "trace-alloc.h"
#endif
#include "eintr.h"
#include "stats.h"
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_OFILE) && !defined(RLIMIT_NOFILE)
# define RLIMIT_NOFILE RLIMIT_OFILE
......@@ -572,6 +573,7 @@ main (int argc,
#ifdef ENCRYPT_PASSWORDS
/* Seed the random number generator. */
/* FIXME (bug 1068): This is not a good way to seed it... */
srand(time(NULL) + getpid());
#endif
......@@ -616,6 +618,8 @@ main (int argc,
sfree(default_config_file);
save_pid();
init_stats();
check_stat("init");
toploop();
......@@ -638,6 +642,7 @@ main (int argc,
/* Finish */
dump_exit_statistics();
check_stat("shutdown");
kom_log("%s terminated normally.\n", argv[0]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment