]> git.e2factory.org Git - e2factory.git/commitdiff
bugfix: close pipe
authorGordon Hecker <gh@emlix.com>
Fri, 6 Aug 2010 09:16:00 +0000 (11:16 +0200)
committerGordon Hecker <gh@emlix.com>
Fri, 6 Aug 2010 09:16:27 +0000 (11:16 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
generic/e2lib.lua

index 15f28c8646523585ea5d27e89cf3b0262aed2d30..5d65e518cefc52976c31a85f81225eda5dcd8fe3 100644 (file)
@@ -214,10 +214,10 @@ function program_output(cmd)
   local i = io.popen(cmd)
   if not i then
     abort("invocation of program failed:  ", cmd)
-  else
-    local input = i:read("*a")
-    return input
   end
+  local input = i:read("*a")
+  i:close()
+  return input
 end
 
 --- print a warning, composed by concatenating all arguments to a string