mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-26 04:57:24 -05:00
made os.spawn dump errors to stdout
This commit is contained in:
parent
6b62292dd1
commit
638092b4cc
@ -8,7 +8,7 @@ function runfile(p,...) -- runs file *p* with arbitrary arguments in the current
|
|||||||
return loadfile(p)(...)
|
return loadfile(p)(...)
|
||||||
end
|
end
|
||||||
function spawnfile(p,n) -- spawns a new process from file *p* with name *n*
|
function spawnfile(p,n) -- spawns a new process from file *p* with name *n*
|
||||||
return os.spawn(loadfile(p),n)
|
return os.spawn(function() print(pcall(loadfile(p))) end,n)
|
||||||
end
|
end
|
||||||
function require(f) -- searches for a library with name *f* and returns what the library returns, if possible
|
function require(f) -- searches for a library with name *f* and returns what the library returns, if possible
|
||||||
local lib = os.getenv("LIB") or "/boot/lib"
|
local lib = os.getenv("LIB") or "/boot/lib"
|
||||||
|
Loading…
Reference in New Issue
Block a user