return result_code as integer as well

This commit is contained in:
Gerhard Hoffmann 2022-06-04 18:10:55 +02:00
parent 49ac77340c
commit 3c935cc99f

View File

@ -8,6 +8,8 @@ exec_process_substitution () {
log_debug "$func:${LINENO} exec-ing [$*]"
exec {fd}< <(eval "$@")
local __result_code=$?
local ps_pid=$! # remember pid of process substitution
local __result=""
@ -24,4 +26,5 @@ exec_process_substitution () {
log_debug "$func:${LINENO} result=$__result"
printf '%s' $__result
return $__result_code
}