working on api docs
This commit is contained in:
1 parent
56d8fb2016
commit
38d56ced19
43 files changed
+5669
-618
No files matched your search
@@ -103,7 +103,14 @@ local function spawnShell(username, uid, shell, homedir)
|
||||
|
||||
local shellfunc, err = load(fs.readAllText(shell))
|
||||
|
||||
local ok, err = pcall(syscall.spawn, shellfunc, username .. ":shell", nil,nil,nil,true)
|
||||
local function loader()
|
||||
syscall.open("/dev/input/keyboard1", "r")
|
||||
syscall.open("/dev/tty/1", "w")
|
||||
syscall.open("/dev/null", "w")
|
||||
shellfunc()
|
||||
end
|
||||
|
||||
local ok, err = pcall(syscall.spawn, loader, username .. ":shell", nil,nil,nil,true)
|
||||
if not ok then
|
||||
syscall.write(1, "login: failed to launch shell: " .. tostring(err) .. "\n")
|
||||
sleep(2)
|
||||
|
||||
@@ -103,7 +103,14 @@ local function spawnShell(username, uid, shell, homedir)
|
||||
|
||||
local shellfunc, err = load(fs.readAllText(shell))
|
||||
|
||||
local ok, err = pcall(syscall.spawn, shellfunc, username .. ":shell", nil,nil,nil,true)
|
||||
local function loader()
|
||||
syscall.open("/dev/input/keyboard1", "r")
|
||||
syscall.open("/dev/tty/1", "w")
|
||||
syscall.open("/dev/null", "w")
|
||||
shellfunc()
|
||||
end
|
||||
|
||||
local ok, err = pcall(syscall.spawn, loader, username .. ":shell", nil,nil,nil,true)
|
||||
if not ok then
|
||||
syscall.write(1, "login: failed to launch shell: " .. tostring(err) .. "\n")
|
||||
sleep(2)
|
||||
|
||||
Reference in new issue
Block a user