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
f337d788
Commit
f337d788
authored
Sep 05, 1995
by
Per Cederqvist
Browse files
(savecore): New function.
(main): Call it before starting a new lyskomd.
parent
19e8fa29
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/updateLysKOM.c
View file @
f337d788
/*
* $Id: updateLysKOM.c,v 1.
4
199
4
/0
4
/05
20:3
0:0
0
ceder Exp $
* $Id: updateLysKOM.c,v 1.
5
199
5
/0
9
/05
19:0
0:0
3
ceder Exp $
* Copyright (C) 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -119,6 +119,18 @@ checkstatus(FILE *fp,
}
}
/* Ignore errors in this function. */
static
void
savecore
(
void
)
{
struct
stat
statbuf
;
if
(
stat
(
DEFAULT_PREFIX
"cores/core"
,
&
statbuf
)
==
0
&&
stat
(
DEFAULT_PREFIX
"bin/savecore"
,
&
statbuf
)
==
0
)
{
system
(
DEFAULT_PREFIX
"bin/savecore"
);
}
}
int
main
(
int
argc
,
...
...
@@ -141,7 +153,7 @@ main (int argc,
{
case
'V'
:
case
'v'
:
fprintf
(
stderr
,
"updateLysKOM %d $Revision: 1.
4
$
\n
"
,
fprintf
(
stderr
,
"updateLysKOM %d $Revision: 1.
5
$
\n
"
,
#include
"version.incl"
);
exit
(
0
);
...
...
@@ -185,6 +197,9 @@ main (int argc,
perror
(
""
);
exit
(
1
);
}
savecore
();
execl
(
DEFAULT_PREFIX
"/bin/lyskomd"
,
"lyskomd"
,
(
char
*
)
0
);
fprintf
(
stderr
,
"%s: execl() failed: "
,
argv
[
0
]);
perror
(
""
);
...
...
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