Unverified Commit f4ce67ec by Tycho Andersen Committed by Christian Brauner

fix lxc_error_set_and_log to match the docs

The documentation for this function says if the task was killed by a signal, the return code will be 128+n, where n is the signal number. Let's make that actually true. (We'll use this behavior in later patches.) Signed-off-by: 's avatarTycho Andersen <tycho@tycho.ws>
parent 1e511590
...@@ -52,6 +52,7 @@ extern int lxc_error_set_and_log(int pid, int status) ...@@ -52,6 +52,7 @@ extern int lxc_error_set_and_log(int pid, int status)
if (WIFSIGNALED(status)) { if (WIFSIGNALED(status)) {
int signal = WTERMSIG(status); int signal = WTERMSIG(status);
INFO("Child <%d> ended on signal (%d)", pid, signal); INFO("Child <%d> ended on signal (%d)", pid, signal);
ret = 128 + signal;
} }
return ret; return ret;
......
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