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

(init_data_base): Log the name of the lock file.

(initialize): Lock the database before opening it.
(main): Unlock the database.
parent a1dd83f7
/*
* $Id: ramkomd.c,v 0.84 1999/05/16 21:46:31 ceder Exp $
* $Id: ramkomd.c,v 0.85 1999/05/21 06:51:48 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -44,7 +44,7 @@
#endif
static const char *
rcsid = "$Id: ramkomd.c,v 0.84 1999/05/16 21:46:31 ceder Exp $";
rcsid = "$Id: ramkomd.c,v 0.85 1999/05/21 06:51:48 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -108,6 +108,7 @@ USE(rcsid);
#include "sigflags.h"
#include "local-to-global.h"
#include "server-time.h"
#include "lockdb.h"
#ifdef TRACED_ALLOCATIONS
# include "trace-alloc.h"
#endif
......@@ -193,6 +194,7 @@ init_data_base(void)
kom_log("Database = %s\n", param.datafile_name);
kom_log("Backup = %s\n", param.backupfile_name);
kom_log("2nd Backup = %s\n", param.backupfile_name_2);
kom_log("Lock File = %s\n", param.lockfile_name);
if ( init_cache() == FAILURE )
restart_kom ("Cannot find database.\n");
......@@ -423,6 +425,8 @@ initialize(const char *config_file)
#endif
go_daemon();
if (lock_db() < 0)
exit(1);
server_init(param.ip_client_host, param.ip_client_port);
init_data_base();
}
......@@ -533,6 +537,7 @@ main (int argc,
logout_all_clients();
isc_shutdown(kom_server_mcb);
cache_sync_all();
unlock_db();
free_kom_info();
......
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