Mercurial Hosting > luan
comparison src/luan/modules/http/tools/Shell_mod.luan @ 1177:26533dd4cd09
add Shell_mod.env
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 12 Feb 2018 19:30:27 -0700 |
parents | 3ef883468fd0 |
children | 5dbb552075ff |
comparison
equal
deleted
inserted
replaced
1176:79b1e9ffd0c0 | 1177:26533dd4cd09 |
---|---|
24 return to_string(count) | 24 return to_string(count) |
25 end}).next | 25 end}).next |
26 | 26 |
27 local history = "" | 27 local history = "" |
28 local env = {} | 28 local env = {} |
29 Shell_mod.env = env | |
29 | 30 |
30 local fns = {} | 31 local fns = {} |
31 | 32 |
32 function fns.history() | 33 function fns.history() |
33 return history | 34 return history |
61 | 62 |
62 local timeout = Time.period{hours=10} | 63 local timeout = Time.period{hours=10} |
63 | 64 |
64 local function get_session(session_id) | 65 local function get_session(session_id) |
65 return Thread.global_callable("shell.session"..session_id,timeout,fns) | 66 return Thread.global_callable("shell.session"..session_id,timeout,fns) |
66 -- return fns | |
67 end | 67 end |
68 | 68 |
69 local function remove_session(session_id) | 69 local function remove_session(session_id) |
70 return Thread.remove_global_callable("shell.session"..session_id) | 70 return Thread.remove_global_callable("shell.session"..session_id) |
71 end | 71 end |