Skip to contentSkip to conversation

bash: fix wrong exit status offset

PATCH New Rui Wang 1 participant 1 message Jul 16, 2018

lore
Share & tools
lore

Rui Wang

author
#0 lore raw

PATCH 1/1 bash: fix wrong exit status offset

In Linux,8 bits of the return code and 8 bits of the number of the killing signal are mixed into a single value on the exit code, so the exit status offset should be 8. But the autoconf checker can not determine it while cross compiling, and then it is set to the default value 0, which will cause generating the wrong exit code if program exit with an error code.

---
 meta/recipes-extended/bash/bash.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/bash/bash.inc +1 -1
index f4e1f7a11f..ada9f51ca2 100644
@@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native virtual/libiconv"
 inherit autotools gettext texinfo update-alternatives ptest
 
 EXTRA_AUTORECONF += "--exclude=autoheader --exclude=aclocal"
-EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
+EXTRA_OECONF = "--enable-job-control --without-bash-malloc bash_cv_wexitstatus_offset=8"
 
 # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
 # startup files, even if they are not interactive.
Signature · 1 line
2.13.3