made os.taskInfo() not choke on being outside a process

This commit is contained in:
Izaya 2019-11-09 13:14:58 +11:00
parent 23680afd75
commit 98e3581e6e

View File

@ -30,6 +30,7 @@ function os.tasks()
return rt
end
function os.taskInfo(pid)
if not tTasks[pid] then return false end
return {name=tTasks[pid].n,parent=tTasks[pid].P}
end
function os.sched() -- the actual scheduler function