diff options
author | 2008-02-10 21:31:53 -0500 | |
---|---|---|
committer | 2008-02-10 21:31:53 -0500 | |
commit | 2a8b91209627608fe61c21ec96de31b7fffcea94 (patch) | |
tree | 039767373d0a3f688c86cc8c1692fc422b80696d /modules/lua/commands.lua | |
parent | 655d3222b8e242bcdb96e9458dc311aee1a658e5 (diff) | |
download | textadept-2a8b91209627608fe61c21ec96de31b7fffcea94.tar.gz textadept-2a8b91209627608fe61c21ec96de31b7fffcea94.zip |
Instead of io.popen():read(), a file descriptor is kept and close()'d afterward.
Diffstat (limited to 'modules/lua/commands.lua')
-rw-r--r-- | modules/lua/commands.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/lua/commands.lua b/modules/lua/commands.lua index b5d0c524..2130ff18 100644 --- a/modules/lua/commands.lua +++ b/modules/lua/commands.lua @@ -62,7 +62,9 @@ end function run() local buffer = buffer local cmd = 'lua "'..buffer.filename..'" 2>&1' - local out = io.popen(cmd):read('*all') + local p = io.popen(cmd) + local out = p:read('*all') + p:close() textadept.print('> '..cmd..'\n'..out) end |