mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-09-27 22:49:02 +00:00
This commit is contained in:
parent
c0a13f66ee
commit
40bf417cb4
2
lsyncd.c
2
lsyncd.c
@ -911,7 +911,7 @@ masterloop(lua_State *L)
|
|||||||
while(1) {
|
while(1) {
|
||||||
int status;
|
int status;
|
||||||
pid_t pid = waitpid(0, &status, WNOHANG);
|
pid_t pid = waitpid(0, &status, WNOHANG);
|
||||||
|
printlogf(L, DEBUG, "waitpid=%d", (int) pid);
|
||||||
if (pid <= 0) {
|
if (pid <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ local event_names = {
|
|||||||
-- TODO
|
-- TODO
|
||||||
--
|
--
|
||||||
local function delay_action(atype, wd, sync, filename, time)
|
local function delay_action(atype, wd, sync, filename, time)
|
||||||
print("delay_action "..event_names[atype].."("..wd..") ")
|
log(DEBUG, "delay_action "..event_names[atype].."("..wd..") ")
|
||||||
local origin = sync.origin
|
local origin = sync.origin
|
||||||
local delays = origin.delays
|
local delays = origin.delays
|
||||||
local nd = {atype = atype,
|
local nd = {atype = atype,
|
||||||
@ -162,14 +162,14 @@ end
|
|||||||
-- zombie process was collected by core.
|
-- zombie process was collected by core.
|
||||||
--
|
--
|
||||||
function lsyncd_collect_process(pid, exitcode)
|
function lsyncd_collect_process(pid, exitcode)
|
||||||
|
log(DEBUG, "collected "..pid)
|
||||||
local process = processes[pid]
|
local process = processes[pid]
|
||||||
if process == nil then
|
if process == nil then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local sync = process.sync
|
local sync = process.sync
|
||||||
local origin = sync.origin
|
local origin = sync.origin
|
||||||
log(DEBUG, "collected "..pid..": "..event_names[atpye].." "..origin.source.."/"..sync.path..process.filename..
|
print("collected ", pid, ": ", vent_names[atpye], origin.source, "/", sync.path , process.filename, " = ", exitcode)
|
||||||
" = "..exitcode)
|
|
||||||
processes[pid] = nil
|
processes[pid] = nil
|
||||||
origin.processes[pid] = nil
|
origin.processes[pid] = nil
|
||||||
end
|
end
|
||||||
@ -218,7 +218,7 @@ local function invoke_action(delay)
|
|||||||
atpye = delay.atype,
|
atpye = delay.atype,
|
||||||
wd = delay.wd,
|
wd = delay.wd,
|
||||||
sync = delay.sync,
|
sync = delay.sync,
|
||||||
filename = delay.filname
|
filename = delay.filename
|
||||||
}
|
}
|
||||||
processes[pid] = process
|
processes[pid] = process
|
||||||
origin.processes[pid] = process
|
origin.processes[pid] = process
|
||||||
|
Loading…
Reference in New Issue
Block a user