mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-30 18:25:13 +08:00
update 2026-10-03 17:36:19
This commit is contained in:
1 parent
ba8090b29d
commit
7a2d332eaf
1968 files changed
+1523393
-89
No files matched your search
@@ -215,7 +215,7 @@ end
|
||||
function exec_call(cmd)
|
||||
math.randomseed(os.time())
|
||||
local tag = "\x01__RC__" .. tostring(math.random(100000, 999999)) .. "\x01"
|
||||
local f = io.popen('(' .. cmd .. '); printf "\\n' .. tag .. '%d" "$?"')
|
||||
local f = io.popen('(' .. cmd .. ') 2>&1; printf "\\n' .. tag .. '%d" "$?"')
|
||||
local out = f:read("*a") or ""
|
||||
f:close()
|
||||
local rc = out:match(tag .. "(%d+)%s*$")
|
||||
|
||||
Reference in new issue
Block a user