This commit is contained in:
Axel Kittenberger 2010-10-23 19:19:46 +00:00
parent 79082cb861
commit 0ff894eee9
2 changed files with 15 additions and 0 deletions

View File

@ -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));

View File

@ -54,6 +54,7 @@ local origins = {}
-- .filename .. filename or nil (=dir itself)
-- (.movepeer) .. for MOVEFROM/MOVETO link to other delay
-- }
-
-- }
--
local targets = {}