set-option
ignoreeof shell option
Prevents an ordinary interactive EOF from immediately ending the shell. IGNOREEOF controls the tolerated consecutive EOF count; explicit exit still works. Ctrl-D on an empty line is the usual EOF binding. The fixture checks one EOF followed by a normal command. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Use interactive Bash with default key bindings; expected visible result: still running.
Formal Syntax & Structure
bash syntaxbash
set -o ignoreeof; set +o ignoreeofReturn Value
exit status
Returns zero on success and nonzero on failure; option queries return zero when enabled.
Working Example
Example Snippetbash
# In fresh interactive Bash:set -o ignoreeof# Press Ctrl-D on an empty line; then type:printf 'still running\n'