]> git.e2factory.org Git - e2factory.git/commitdiff
Repair error reporting in e2lib.wait()
authorTobias Ulmer <tu@emlix.com>
Fri, 15 Nov 2013 11:39:21 +0000 (12:39 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index bdefd4e5d830c39ab8fe5a76b47136740fb719dc..230ecf8d87215a4c0a8fc4e101998b6cd788f1c5 100644 (file)
@@ -200,14 +200,13 @@ end
 -- @return Exit status of process (WEXITSTATUS), or false on error.
 -- @return Process ID of the terminated child or error object on failure.
 function e2lib.wait(pid)
-    local rc, pid = le2lib.wait(pid)
+    local rc, childpid = le2lib.wait(pid)
 
     if not rc then
-        local errstring = pid
-        return false, err.new("waiting for child %d failed: %s", pid, errstring)
+        return false, err.new("waiting for child %d failed: %s", pid, childpid)
     end
 
-    return rc, pid
+    return rc, childpid
 end
 
 --- Poll input output multiplexing.