removed os.spawnfile because nothing used it and it doesn't align with the system's design

This commit is contained in:
Izaya 2020-06-29 15:26:27 +10:00
parent 5938f75f4c
commit 216e0a15c6
1 changed files with 1 additions and 4 deletions

View File

@ -7,10 +7,7 @@ end
function runfile(p,...) -- string -- -- runs file *p* with arbitrary arguments in the current thread
return loadfile(p)(...)
function os.spawnfile(p,n,...) -- string string -- number -- spawns a new process from file *p* with name *n*, with arguments following *n*.
local tA = {...}
return os.spawn(function() local res={pcall(loadfile(p), table.unpack(tA))} computer.pushSignal("process_finished",, table.unpack(res)) dprint(table.concat(res)) end,n or p)
_G.package = {}
package.loaded = {computer=computer,component=component,fs=fs,buffer=buffer}