Skip to content
GitLab
Menu
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
4ae9bc32
Commit
4ae9bc32
authored
Oct 31, 2002
by
Per Cederqvist
Browse files
(save_pid, dump_exit_statistics): Use i_fopen and i_fclose instead of
fopen and fclose.
parent
7d6735ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/ramkomd.c
View file @
4ae9bc32
/*
* $Id: ramkomd.c,v 0.10
9
2002/10/
27 23:02:47
ceder Exp $
* $Id: ramkomd.c,v 0.1
1
0 2002/10/
31 09:31:19
ceder Exp $
* Copyright (C) 1991-1999, 2001-2002 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -114,6 +114,7 @@
#ifdef TRACED_ALLOCATIONS
# include "trace-alloc.h"
#endif
#include
"eintr.h"
#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_OFILE) && !defined(RLIMIT_NOFILE)
# define RLIMIT_NOFILE RLIMIT_OFILE
...
...
@@ -277,11 +278,11 @@ save_pid(void)
{
FILE
*
fp
;
if
((
fp
=
fopen
(
param
.
pid_name
,
"w"
))
==
NULL
)
if
((
fp
=
i_
fopen
(
param
.
pid_name
,
"w"
))
==
NULL
)
return
;
fprintf
(
fp
,
"%ld
\n
"
,
(
long
)
getpid
());
fclose
(
fp
);
i_
fclose
(
fp
);
}
static
void
...
...
@@ -660,8 +661,8 @@ dump_exit_statistics(void)
FILE
*
stat_file
;
time_t
now
;
time
(
&
now
);
stat_file
=
fopen
(
param
.
memuse_name
,
"a"
);
time
(
&
now
);
stat_file
=
i_
fopen
(
param
.
memuse_name
,
"a"
);
if
(
stat_file
==
NULL
)
restart_kom
(
"Can't open file to save memory usage to.
\n
"
);
...
...
@@ -685,7 +686,7 @@ dump_exit_statistics(void)
dump_allocated_connections
(
stat_file
);
dump_isc_alloc_counts
(
stat_file
);
dump_l2g_stats
(
stat_file
);
fclose
(
stat_file
);
i_
fclose
(
stat_file
);
}
static
void
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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