From 1c647c76fe3544930ee3f9cc09e15f1774cab33d Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Sun, 12 Nov 2023 23:31:56 +1000 Subject: [PATCH] fix timeout accounting in the scheduler --- module/sched.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/module/sched.lua b/module/sched.lua index 0e16936..65caa55 100644 --- a/module/sched.lua +++ b/module/sched.lua @@ -41,7 +41,7 @@ end function os.taskInfo(pid) -- number -- table -- returns info on process *pid* as a table with name and parent values pid = pid or os.pid() if not tTasks[pid] then return false end - return {name=tTasks[pid].n,parent=tTasks[pid].P,cputime=tTasks[pid].t,iotime=tTasks[pid].T} + return {name=tTasks[pid].n,parent=tTasks[pid].P,cputime=tTasks[pid].t,iotime=tTasks[pid].T,timeout=tTasks[pid].E} end function os.sched() -- the actual scheduler function os.sched = nil @@ -60,7 +60,6 @@ function os.sched() -- the actual scheduler function tTasks[k] = nil end end - sTimeout = nTimeout end end function os.setenv(k,v) -- set's the current process' environment variable *k* to *v*, which is passed to children @@ -73,9 +72,6 @@ function os.getenv(k) -- gets a process' *k* environment variable return tTasks[cPid].e[k] end end -function os.getTimeout() - return tTasks[cPid].E -end function os.setTimeout(n,pid) assert(type(n) == "number" and n >= 0) tTasks[pid or cPid].E = n