made os.taskInfo() default to the current process

This commit is contained in:
Izaya 2019-11-09 13:52:39 +11:00
parent d23a25613d
commit 1bd18f45b3
1 changed files with 1 additions and 0 deletions

View File

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