bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: With DEBUG trap, resizing window crashes script


From: Eduardo Bustamante
Subject: Re: With DEBUG trap, resizing window crashes script
Date: Wed, 10 May 2023 13:13:16 -0700

On Wed, May 10, 2023 at 1:03 PM Wiley Young <wyeth2485@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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]