made lua debugger stop crying and added more docs

This commit is contained in:
2026-01-16 08:40:16 -05:00
parent e5d6ec9725
commit bd8fe50770
17 changed files with 66 additions and 105 deletions

View File

@@ -204,6 +204,7 @@ function type(object, trueType)
else
if oldtype(oldgetmetatable(object))=="table" then
local metatable = oldgetmetatable(object)
---@diagnostic disable-next-line: need-check-nil
if metatable.__type then return metatable.__type end
else
return "table"

View File

@@ -275,4 +275,4 @@ kernel.syscalls["VFS_whereis"] = vfs.whereis
kernel.syscalls["VFS_dup"] = vfs.dup
kernel.syscalls["VFS_dup2"] = vfs.dup2
kernel.log("VFS module loaded")
kernel.log("VFS module loaded")

View File

@@ -6,6 +6,13 @@ kernel.processes.keventd = function()
while true do
local event = {kernel.computer:getMachineEvent()}
if event[1] then
if event[1]=="keyTyped" then
if event[3]=="\x1b^s" then
kernel.shutdown()
elseif event[3]=="\x1b^r" then
kernel.reboot()
end
end
events.push(event)
end
end

View File

@@ -29,7 +29,7 @@ function sys.spawn(func, name, envars, args, tgid)
tasks[tostring(id)].exit=err
end
end),
name=name or "task"..tostring(id),
name=name or ("task"..tostring(id)),
envars=envars or {},
args=args or {},
status="R",