mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-13 14:43:09 +00:00
This commit is contained in:
parent
79082cb861
commit
0ff894eee9
14
lsyncd.c
14
lsyncd.c
@ -907,6 +907,20 @@ masterloop(lua_State *L)
|
||||
handle_event(L, NULL);
|
||||
}
|
||||
|
||||
/* collect zombified child processes */
|
||||
while(1) {
|
||||
pid_t pid = waitpid(0, &status, WNOHANG);
|
||||
int status;
|
||||
|
||||
if (pid <= 0) {
|
||||
break;
|
||||
}
|
||||
lua_getglobal(L, "lsyncd_collect_child");
|
||||
lua_pushinteger(L, pid);
|
||||
lua_pushinteger(L, WEXITSTATUS(status));
|
||||
lua_call(L, 2, 0);
|
||||
}
|
||||
|
||||
/* let the runner spawn child processes */
|
||||
lua_getglobal(L, "lsyncd_alarm");
|
||||
lua_pushinteger(L, times(NULL));
|
||||
|
@ -54,6 +54,7 @@ local origins = {}
|
||||
-- .filename .. filename or nil (=dir itself)
|
||||
-- (.movepeer) .. for MOVEFROM/MOVETO link to other delay
|
||||
-- }
|
||||
-
|
||||
-- }
|
||||
--
|
||||
local targets = {}
|
||||
|
Loading…
Reference in New Issue
Block a user