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
333547da
Commit
333547da
authored
Nov 14, 2015
by
antirez
Browse files
Lua debugger: call wait3() if there are pending forked debugging sessions.
parent
01636435
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
333547da
...
...
@@ -1650,6 +1650,12 @@ int ldbRemoveChild(pid_t pid) {
return
0
;
}
/* Return the number of children we still did not received termination
* acknowledge via wait() in the parent process. */
int
ldbPendingChildren
(
void
)
{
return
listLength
(
ldb
.
children
);
}
/* Kill all the forked sessions. */
void
ldbKillForkedSessions
(
void
)
{
listIter
li
;
...
...
src/server.c
View file @
333547da
...
...
@@ -1186,7 +1186,9 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
}
/* Check if a background saving or AOF rewrite in progress terminated. */
if
(
server
.
rdb_child_pid
!=
-
1
||
server
.
aof_child_pid
!=
-
1
)
{
if
(
server
.
rdb_child_pid
!=
-
1
||
server
.
aof_child_pid
!=
-
1
||
ldbPendingChildren
())
{
int
statloc
;
pid_t
pid
;
...
...
src/server.h
View file @
333547da
...
...
@@ -1473,6 +1473,7 @@ int redis_check_rdb_main(char **argv, int argc);
void
scriptingInit
(
int
setup
);
int
ldbRemoveChild
(
pid_t
pid
);
void
ldbKillForkedSessions
(
void
);
int
ldbPendingChildren
(
void
);
/* Blocked clients */
void
processUnblockedClients
(
void
);
...
...
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