Commit 5b27b36c authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(restart_kom): Moved to log.c.

parent 60fd912f
/* /*
* $Id: ramkomd.c,v 0.65 1998/07/08 17:00:34 ceder Exp $ * $Id: ramkomd.c,v 0.66 1998/07/12 01:24:19 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association. * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
*/ */
static const char * static const char *
rcsid = "$Id: ramkomd.c,v 0.65 1998/07/08 17:00:34 ceder Exp $"; rcsid = "$Id: ramkomd.c,v 0.66 1998/07/12 01:24:19 ceder Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -556,53 +556,3 @@ dump_exit_statistics(void) ...@@ -556,53 +556,3 @@ dump_exit_statistics(void)
dump_isc_alloc_counts(stat_file); dump_isc_alloc_counts(stat_file);
fclose (stat_file); fclose (stat_file);
} }
void
#if defined(HAVE_VFPRINTF) && defined(HAVE_STDARG_H)
restart_kom(const char * format, ...)
#else
restart_kom(format,
a, b, c, d, e, f, g)
const char *format;
int a, b, c, d, e, f, g;
#endif
{
#if defined(HAVE_VFPRINTF) && defined(HAVE_STDARG_H)
va_list AP;
#endif
#if defined(HAVE_GETCWD)
char pathname[1026];
#else /* !defined(HAVE_GETCWD) */
char *getwd(char *); /* +++ should be in sys/param.h */
# if defined(MAXPATHLEN)
char pathname[MAXPATHLEN];
# else
char pathname[1024];
# endif /* !defined(MAXPATHLEN) */
#endif /* !defined(HAVE_GETCWD) */
#if defined(HAVE_VFPRINTF) && defined(HAVE_STDARG_H)
va_start(AP, format);
logv(format, AP);
va_end(AP);
#else
log(format, a, b, c, d, e, f, g);
#endif
log("Previous message is fatal. Will dump core now.\n");
#ifdef HAVE_GETCWD
/* getcwd is POSIX, so try that first. */
if (getcwd(pathname, 1026) == NULL)
log("getcwd failed: errno %d\n", errno);
else
log("Search for the core in %s\n", pathname);
#else
if ( getwd(pathname) == NULL )
log("getwd failed: %s\n", pathname);
else
log("Search for the core in %s\n", pathname);
#endif
abort();
}
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