Commit 1170f74c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Minor cleanups.

parent 531b3f6c
......@@ -6,7 +6,7 @@
* Created by Willf|r 31/3-90. Mostly written by ceder.
*/
static char *rcsid = "$Id: connections.c,v 0.8 1991/08/28 02:21:52 ceder Exp $";
static char *rcsid = "$Id: connections.c,v 0.9 1991/08/30 01:32:50 ceder Exp $";
#include <errno.h>
......@@ -44,7 +44,22 @@ static char *rcsid = "$Id: connections.c,v 0.8 1991/08/28 02:21:52 ceder Exp $";
ISCMCB * kom_server_mcb = NULL;
Connection * active_connection = NULL;
/*
* This is set TRUE when the server should be closed. It is checked
* each time around the main loop. It is set if someone with enough
* privileges issues a `shutdown', or of lyskomd receives a SIGHUP.
* This not an abort: all data is saved before we exit.
*/
volatile Bool go_and_die = FALSE;
/*
* Once upon a time the entire database was always held in core, and
* saved to disk when we got a SIGUSR1 signal. Nowadays the server
* keeps track of the time itself and saves at appropriate intervalls.
* It does still write some statistics when it get a SIGUSR1 signal.
* The signal handler sets do_sync_db. The name is retained for
* historical reasons.
*/
volatile Bool do_sync_db = FALSE;
jmp_buf parse_env;
......@@ -760,11 +775,15 @@ toploop(void)
{
if (do_sync_db)
{
cache_sync(); /* A noop in diskomd. Actually
/*
* do_sync_db used to save the entire database. Nowadays
* all it does is to print some statistics.
*/
cache_sync(); /* A noop in lyskomd. Actually
stops the server and dumps
everything in ramkomd. */
dump_statistics();
do_sync_db = 0;
do_sync_db = FALSE;
}
gettimeofday(&before, NULL);
......
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