CRITICAL FIX: Use return instead of exit - prevent SSH session termination
This commit is contained in:
+3
-5
@@ -709,11 +709,9 @@ main() {
|
||||
show_main_menu
|
||||
|
||||
# Read from terminal (use /dev/tty directly for interaction)
|
||||
if read -r choice 2>/dev/null </dev/tty; then
|
||||
: # Input read successfully
|
||||
else
|
||||
# No terminal available, exit gracefully
|
||||
exit 0
|
||||
if ! read -r choice 2>/dev/null </dev/tty; then
|
||||
# No terminal available, return from function gracefully
|
||||
return 0
|
||||
fi
|
||||
|
||||
case $choice in
|
||||
|
||||
Reference in New Issue
Block a user