I am trying to make use of the solution presented in one of the answers of https://stackoverflow.com/questions/1167746/how-to-assign-a-heredoc-value-to-a-variable-in-bashIn Bash version 4.2.47(1)-release when I execute the following code it prematurely exits because read fails when it encounters EOF:shopt -os errexitfunction foobar {    local desc=    read -d '' -r desc <<EOFbla blaEOF    echo $desc}In order to return success if read fails at EOF I have rewritten the line as read -d '' -r desc || true <<EOF but now the script indefinitely waits.Do you know how to make this code work?
How to combine Bash's read with HERE-document when shopt -os errexit is in place?
bash;variable;here document;read;shopt