From: Tycho Andersen Date: Fri, 19 Jan 2018 03:20:08 +0000 (+0000) Subject: fix lxc_error_set_and_log to match the docs X-Git-Tag: lxc-2.0.10~403 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4ce67ece4603c0fe24880d9cc47f17673f498e2;p=thirdparty%2Flxc.git 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: Tycho Andersen --- diff --git a/src/lxc/error.c b/src/lxc/error.c index 81d6a376e..9147a6afb 100644 --- a/src/lxc/error.c +++ b/src/lxc/error.c @@ -52,6 +52,7 @@ extern int lxc_error_set_and_log(int pid, int status) if (WIFSIGNALED(status)) { int signal = WTERMSIG(status); INFO("Child <%d> ended on signal (%d)", pid, signal); + ret = 128 + signal; } return ret;