Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
42ab0172
Commit
42ab0172
authored
Mar 19, 2010
by
Antonio Ognio
Browse files
Solving issue #191 on Google Code: -v and --version should print the version of Redis
parent
c77169b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
42ab0172
...
@@ -1102,6 +1102,8 @@ static dictType keylistDictType = {
...
@@ -1102,6 +1102,8 @@ static dictType keylistDictType = {
dictListDestructor
/* val destructor */
dictListDestructor
/* val destructor */
};
};
static
void
version
();
/* ========================= Random utility functions ======================= */
/* ========================= Random utility functions ======================= */
/* Redis generally does not try to recover from out of memory conditions
/* Redis generally does not try to recover from out of memory conditions
...
@@ -9122,11 +9124,19 @@ static void daemonize(void) {
...
@@ -9122,11 +9124,19 @@ static void daemonize(void) {
}
}
}
}
static
void
version
()
{
printf
(
"Redis server version %s
\n
"
,
REDIS_VERSION
);
exit
(
0
);
}
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
time_t
start
;
time_t
start
;
initServerConfig
();
initServerConfig
();
if
(
argc
==
2
)
{
if
(
argc
==
2
)
{
if
((
strcmp
(
argv
[
1
],
"-v"
)
==
0
)
||
(
strcmp
(
argv
[
1
],
"--version"
)
==
0
))
{
version
();
}
resetServerSaveParams
();
resetServerSaveParams
();
loadServerConfig
(
argv
[
1
]);
loadServerConfig
(
argv
[
1
]);
}
else
if
(
argc
>
2
)
{
}
else
if
(
argc
>
2
)
{
...
...
Write
Preview
Markdown
is supported
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