Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
44d8dbb3
Commit
44d8dbb3
authored
May 15, 1999
by
Per Cederqvist
Browse files
(main): Call trace_alloc_file very early during startup if compiled
with TRACED_ALLOCATIONS.
parent
048b63f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/ramkomd.c
View file @
44d8dbb3
/*
* $Id: ramkomd.c,v 0.8
2
1999/05/1
2 13:25:27 by
er
s
Exp $
* $Id: ramkomd.c,v 0.8
3
1999/05/1
5 22:55:26 ced
er 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.8
2
1999/05/1
2 13:25:27 by
er
s
Exp $"
;
rcsid
=
"$Id: ramkomd.c,v 0.8
3
1999/05/1
5 22:55:26 ced
er Exp $"
;
#include
"rcs.h"
USE
(
rcsid
);
...
...
@@ -107,6 +107,9 @@ USE(rcsid);
#include
"unused.h"
#include
"sigflags.h"
#include
"local-to-global.h"
#ifdef TRACED_ALLOCATIONS
# include "trace-alloc.h"
#endif
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_OFILE) && !defined(RLIMIT_NOFILE)
# define RLIMIT_NOFILE RLIMIT_OFILE
...
...
@@ -437,6 +440,22 @@ main (int argc,
struct
sigaction
act
;
#endif
#ifdef TRACED_ALLOCATIONS
/* We must do this before we allocate any memory... */
{
char
buf
[
1024
];
char
*
nl
;
fputs
(
"Where does the trace want to go today? [stderr]
\n
"
,
stdout
);
fflush
(
stdout
);
if
(
fgets
(
buf
,
sizeof
(
buf
),
stdin
)
!=
buf
)
restart_kom
(
"main(): unable to read trace location
\n
"
);
if
((
nl
=
strchr
(
buf
,
'\n'
))
!=
NULL
)
*
nl
=
'\0'
;
trace_alloc_file
(
buf
);
}
#endif
kom_log
(
"*** Version %s (process %lu) started.
\n
"
,
kom_version_info
.
server_version
,
(
unsigned
long
)
getpid
());
#ifdef DEBUG_CALLS
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment