Hi,

lxc-attach returns the exit code of the program it ran when the program
exits normally (when WIFEXITED returns true, see below). However, when a
program is killed/signaled, lxc-attach returns 1. So currently, it is not
possible to determine whether the program was signaled (because
WEXITSTATUS(ret) may be 1). I was wondering why the exit code of the child
program is not returned by lxc-attach in all cases when ret > 0.

Attached snippet:

ret = lxc_wait_for_pid_status(pid);
if (ret < 0)
return 1;

if (WIFEXITED(ret))
return WEXITSTATUS(ret);

return 1;



Thanks
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to