Compare commits
No commits in common. "be8ba0a40bc7dcee7c2d5c028669e2594dc0b57a" and "6c4518011906b8b2025de0dbc6b592915ee4f8db" have entirely different histories.
be8ba0a40b
...
6c45180119
@ -26,20 +26,11 @@ setmetatable(shenv,{__index=function(_,k)
|
|||||||
if _G[k] then
|
if _G[k] then
|
||||||
return _G[k]
|
return _G[k]
|
||||||
elseif fs.exists("/boot/exec/"..k..".lua") then
|
elseif fs.exists("/boot/exec/"..k..".lua") then
|
||||||
local rqid = string.format("shell-%d",math.random(1,99999))
|
|
||||||
return function(...)
|
return function(...)
|
||||||
local tA = {...}
|
local tA = {...}
|
||||||
local pid = os.spawn(function() computer.pushSignal(rqid,pcall(loadfile("/boot/exec/"..k..".lua"),table.unpack(tA))) end,"/boot/exec/"..k..".lua")
|
local pid = os.spawn(function() loadfile("/boot/exec/"..k..".lua")(table.unpack(tA)) end,"/boot/exec/"..k..".lua")
|
||||||
local tE = {}
|
|
||||||
repeat
|
repeat
|
||||||
tE = {coroutine.yield()}
|
coroutine.yield()
|
||||||
if tE[1] == rqid then
|
|
||||||
table.remove(tE,1)
|
|
||||||
if tE[1] == true then
|
|
||||||
table.remove(tE,1)
|
|
||||||
end
|
|
||||||
return table.unpack(tE)
|
|
||||||
end
|
|
||||||
until tTasks[pid] == nil
|
until tTasks[pid] == nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user