Commit 2ca6cdb6 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(main): Don't die until a character has been read if -d is used.

parent 65305815
/*
* $Id: dbck.c,v 0.53 1999/05/31 12:17:06 byers Exp $
* $Id: dbck.c,v 0.54 1999/06/05 20:48:44 ceder Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -35,7 +35,7 @@
static const char *
rcsid = "$Id: dbck.c,v 0.53 1999/05/31 12:17:06 byers Exp $";
rcsid = "$Id: dbck.c,v 0.54 1999/06/05 20:48:44 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -1690,7 +1690,20 @@ main (int argc,
if (need_rw)
{
if (lock_db() < 0)
{
/* Don't actually die until something is entered on stdin in debug
mode. This is mainly here for the benefit of the test suite,
but is could also be useful to be able to attach a debugger and
do pre-mortem debugging of the process at this point. */
if (buglevel > 0)
{
kom_log("Press enter to terminate dbck\n");
getchar();
}
exit(1);
}
have_lock = 1;
}
......@@ -1751,5 +1764,16 @@ main (int argc,
if (have_lock)
unlock_db();
/* Don't actually die until something is entered on stdin in debug
mode. This is mainly here for the benefit of the test suite,
but is could also be useful to be able to attach a debugger and
do pre-mortem debugging of the process at this point. */
if (buglevel > 0)
{
kom_log("Press enter to terminate dbck\n");
getchar();
}
return errors != 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