shopt-option

huponexit shell option

Sends SIGHUP to jobs when an interactive login shell exits, subject to job handling rules such as disown. It is not a universal child cleanup mechanism. Fixture only checks option state and does not signal any other process. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): enabled then disabled.

Formal Syntax & Structure

bash syntaxbash
shopt -s huponexit; shopt -u huponexit

Return Value

exit status

Setting or clearing an available option succeeds; a query returns zero when enabled and one when disabled.

Working Example

Example Snippetbash
shopt -s huponexit || exit 1shopt -q huponexit || exit 1shopt -u huponexit || exit 1if shopt -q huponexit; then exit 1; fiprintf "enabled then disabled\n"
Bash Reference