Commit 576b950f by Antonio Terceiro

lxc-attach: make sure exit status of command is returned

Commit ae68cad7 introduced a regression that makes lxc-attach ignore the exit status of the executed command. This was first identified in 3.0.4 LTS, while it worked on 3.0.3. # lxc-attach --version 3.0.4 # lxc-attach -n test false; echo $? 0 Signed-off-by: 's avatarAntonio Terceiro <terceiro@debian.org> Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934983
parent faec88e5
......@@ -385,10 +385,9 @@ int main(int argc, char *argv[])
ret = lxc_wait_for_pid_status(pid);
if (ret < 0)
goto out;
if (WIFEXITED(ret))
wexit = WEXITSTATUS(ret);
}
if (WIFEXITED(ret))
wexit = WEXITSTATUS(ret);
out:
lxc_container_put(c);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment