From de7c2eb26c2312d4502d4b42c231e9f57f673547 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 17 Nov 2020 23:39:32 -0800 Subject: [PATCH] multiple-pipeline-capture: simplify func_error_exit() As suggested by Chao in #521 Also remove no-op exit $? on the last line. Signed-off-by: Marc Herbert --- test-case/multiple-pipeline-capture.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test-case/multiple-pipeline-capture.sh b/test-case/multiple-pipeline-capture.sh index d9350d4b..a82b3bf7 100755 --- a/test-case/multiple-pipeline-capture.sh +++ b/test-case/multiple-pipeline-capture.sh @@ -98,12 +98,10 @@ func_run_pipeline_with_type() func_error_exit() { dloge "$*" - ( set +e - pgrep -a aplay - pgrep -a arecord - pkill -9 aplay - pkill -9 arecord - ) + + pgrep -a aplay && pkill -9 aplay + pgrep -a arecord && pkill -9 arecord + exit 1 }