From e7b7863c6d19f21b079580361bc26159edff1582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Vulquin?= Date: Fri, 31 May 2024 19:34:05 +0200 Subject: [PATCH] exec/2: correct typo: STOPSIG is not TERMSIG --- src/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/builtin.c b/src/builtin.c index c7856d68ed..ec75e22858 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -2064,7 +2064,7 @@ static jv f_exec(jq_state *jq, jv input, jv path, jv args) { } else { // POSIX guarantees that this is WIFSIGNALED(ret) obj = jv_object_set(obj, jv_string("status"), jv_number(-1)); - obj = jv_object_set(obj, jv_string("signal"), jv_number(WSTOPSIG(ret))); + obj = jv_object_set(obj, jv_string("signal"), jv_number(WTERMSIG(ret))); } obj = jv_object_set(obj, jv_string("out"), sout); obj = jv_object_set(obj, jv_string("err"), serr);