aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/config.py
diff options
context:
space:
mode:
authorMasahiro Yamada <[email protected]>2022-06-08 10:11:00 +0900
committerMasahiro Yamada <[email protected]>2022-06-10 03:47:13 +0900
commitda4288b95baa1c7c9aa8a476f58b37eb238745b0 (patch)
tree4730da2d97ddcfaae4224786c2ecb88c7c337d43 /scripts/gdb/linux/config.py
parent49c3ca34f7dbe5227c0163cba4deb5d29e145fae (diff)
scripts/check-local-export: avoid 'wait $!' for process substitution
Bash 4.4, released in 2016, supports 'wait $!' to check the exit status of a process substitution, but it seems too new. Some people using older bash versions (on CentOS 7, Ubuntu 16.04, etc.) reported an error like this: ./scripts/check-local-export: line 54: wait: pid 17328 is not a child of this shell I used the process substitution to avoid a pipeline, which executes each command in a subshell. If the while-loop is executed in the subshell context, variable changes within are lost after the subshell terminates. Fortunately, Bash 4.2, released in 2011, supports the 'lastpipe' option, which makes the last element of a pipeline run in the current shell process. Switch to the pipeline with 'lastpipe' solution, and also set 'pipefail' to catch errors from ${NM}. Add the bash requirement to Documentation/process/changes.rst. Fixes: 31cb50b5590f ("kbuild: check static EXPORT_SYMBOL* by script instead of modpost") Reported-by: Tetsuo Handa <[email protected]> Reported-by: Michael Ellerman <[email protected]> Reported-by: Wang Yugui <[email protected]> Tested-by: Tetsuo Handa <[email protected]> Tested-by: Jon Hunter <[email protected]> Acked-by: Nick Desaulniers <[email protected]> Tested-by: Sedat Dilek <[email protected]> # LLVM-14 (x86-64) Signed-off-by: Masahiro Yamada <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/config.py')
0 files changed, 0 insertions, 0 deletions