Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
440385de
"vscode:/vscode.git/clone" did not exist on "58d2bb951a3ad85b312e9e009a66eb1397e38780"
Commit
440385de
authored
Jan 21, 2019
by
WuYunlong
Browse files
Fix child info pipe fd leak when child process gets killed.
parent
81008bf9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/aof.c
View file @
440385de
...
...
@@ -221,6 +221,7 @@ static void killAppendOnlyChild(void) {
server
.
aof_rewrite_time_start
=
-
1
;
/* Close pipes used for IPC between the two processes. */
aofClosePipes
();
closeChildInfoPipe
();
}
/* Called when the user switches from "appendonly yes" to "appendonly no"
...
...
src/db.c
View file @
440385de
...
...
@@ -451,6 +451,7 @@ void flushallCommand(client *c) {
if
(
server
.
rdb_child_pid
!=
-
1
)
{
kill
(
server
.
rdb_child_pid
,
SIGUSR1
);
rdbRemoveTempFile
(
server
.
rdb_child_pid
);
closeChildInfoPipe
();
}
if
(
server
.
saveparamslen
>
0
)
{
/* Normally rdbSave() will reset dirty, but we don't want this here
...
...
src/replication.c
View file @
440385de
...
...
@@ -1255,6 +1255,7 @@ void readSyncBulkPayload(aeEventLoop *el, int fd, void *privdata, int mask) {
(
long
)
server
.
rdb_child_pid
);
kill
(
server
.
rdb_child_pid
,
SIGUSR1
);
rdbRemoveTempFile
(
server
.
rdb_child_pid
);
closeChildInfoPipe
();
}
if
(
rename
(
server
.
repl_transfer_tmpfile
,
server
.
rdb_filename
)
==
-
1
)
{
...
...
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