spm works maybe?
This commit is contained in:
@@ -833,14 +833,18 @@ builtinCmds.ops = function()
|
||||
end
|
||||
end
|
||||
|
||||
builtinCmds.reboot = function ()
|
||||
builtinCmds.reboot = function()
|
||||
syscall.reboot()
|
||||
end
|
||||
|
||||
builtinCmds.shutdown = function ()
|
||||
builtinCmds.shutdown = function()
|
||||
syscall.shutdown()
|
||||
end
|
||||
|
||||
builtinCmds.kill = function(id)
|
||||
syscall.kill(tonumber(id))
|
||||
end
|
||||
|
||||
local function listDir(dir, prefix)
|
||||
local ok, entries = pcall(syscall.listdir, dir)
|
||||
if not ok or not entries then return {} end
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
--:Minify:--
|
||||
local args = {...}
|
||||
local list = syscall.listdir("/proc/self/fd")
|
||||
for i=1, #list do
|
||||
syscall.close(tonumber(list[i]))
|
||||
end
|
||||
|
||||
if #args>=2 then
|
||||
for i=2, #args do
|
||||
syscall.open(args[i], "rw")
|
||||
end
|
||||
end
|
||||
|
||||
syscall.exec(args[1])
|
||||
Reference in New Issue
Block a user