projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
45e2022
)
LuCId: Only count our own threads
author
Steven Barth
<steven@midlink.org>
Mon, 2 Nov 2009 14:21:55 +0000
(14:21 +0000)
committer
Steven Barth
<steven@midlink.org>
Mon, 2 Nov 2009 14:21:55 +0000
(14:21 +0000)
libs/lucid/luasrc/lucid.lua
patch
|
blob
|
history
diff --git
a/libs/lucid/luasrc/lucid.lua
b/libs/lucid/luasrc/lucid.lua
index
e1d7322
..
7a9c4ab
100644
(file)
--- a/
libs/lucid/luasrc/lucid.lua
+++ b/
libs/lucid/luasrc/lucid.lua
@@
-145,9
+145,11
@@
function run()
local pid, stat, code = nixio.wait(-1, "nohang")
while pid and pid > 0 do
local pid, stat, code = nixio.wait(-1, "nohang")
while pid and pid > 0 do
- tcount = tcount - 1
- if tpids[pid] and tpids[pid] ~= true then
- tpids[pid](pid, stat, code)
+ if tpids[pid] then
+ tcount = tcount - 1
+ if tpids[pid] ~= true then
+ tpids[pid](pid, stat, code)
+ end
end
pid, stat, code = nixio.wait(-1, "nohang")
end
end
pid, stat, code = nixio.wait(-1, "nohang")
end
@@
-231,7
+233,7
@@
function create_process(threadcb, waitcb)
end
local pid, code, err = nixio.fork()
if pid and pid ~= 0 then
end
local pid, code, err = nixio.fork()
if pid and pid ~= 0 then
- tpids[pid] = waitcb
+ tpids[pid] = waitcb
or true
tcount = tcount + 1
elseif pid == 0 then
local code = threadcb()
tcount = tcount + 1
elseif pid == 0 then
local code = threadcb()