On Wed, May 10, 2023 at 1:03 PM Wiley Young <wyeth2...@gmail.com> wrote: > (...) > The script is set up to enable the DEBUG trap and prompt. When the first > user prompt appears, in this case `set -x` although xtrace was enabled at > the crashbang, if I resize the window then press enter, the script dies and > displays that a SIGWINCH was received.
It seems to me that Bash is behaving as expected. When the terminal resizes, a SIGWINCH signal (Window resize signal) is sent to the foreground process. You seem to have defined a trap for this signal, and the action of that trap is to kill the current shell with SIGINT (2). > +++./find-and-scan-shell-scripts-sh:1:_debug_prompt: trap SIGWINCH > +++./find-and-scan-shell-scripts-sh:1:_debug_prompt: kill -s 2 96527 If you wish for the current shell to continue running after a terminal resize, then set the signal disposition for SIGWINCH to ignore.