From 19cfa02c4c7bd29cdf10462878d06d025fcc3d27 Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Fri, 19 Jan 2018 03:20:08 +0000 Subject: [PATCH] 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 --- src/lxc/error.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.47.2