added task logging

This commit is contained in:
2026-01-15 16:59:40 -05:00
parent 231b0ced48
commit 96c22f5237
3 changed files with 8 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
# HyperionOS # HyperionOS
WIP ---
# Desclaimer
To build

View File

@@ -12,9 +12,13 @@ function sys.spawn(func, name, envars, args, tgid)
coro=coroutine.create(function() coro=coroutine.create(function()
local ok, err = xpcall(func, debug.traceback, table.unpack(args or {})) local ok, err = xpcall(func, debug.traceback, table.unpack(args or {}))
if not ok then if not ok then
if kernel.config.logTaskExit then
kernel.log("Task "..tostring(id).." exited with err: "..tostring(err), "ERROR")
end
tasks[tostring(id)].status="Z" tasks[tostring(id)].status="Z"
tasks[tostring(id)].exit=tostring(err) tasks[tostring(id)].exit=tostring(err)
else else
kernel.log("Task "..tostring(id).." exited with code: "..tostring(err), "INFO")
tasks[tostring(id)].status="Z" tasks[tostring(id)].status="Z"
tasks[tostring(id)].exit=err tasks[tostring(id)].exit=err
end end

View File

@@ -1,6 +1,7 @@
--:Minify:-- --:Minify:--
local kernel=... local kernel=...
kernel.tty={} kernel.tty={}
kernel.tty.inst={}
function kernel.tty.register(tty, ttyo) function kernel.tty.register(tty, ttyo)
kernel.tty[tty]=ttyo kernel.tty[tty]=ttyo