Skip to content

pkg/terminal: add exit -d to detach without killing the process#4387

Open
larrasket wants to merge 1 commit into
go-delve:masterfrom
larrasket:exit-detach-without-kill
Open

pkg/terminal: add exit -d to detach without killing the process#4387
larrasket wants to merge 1 commit into
go-delve:masterfrom
larrasket:exit-detach-without-kill

Conversation

@larrasket

Copy link
Copy Markdown

Add an exit -d flag that detaches from the target.

exitCommand records the intent on the terminal and handleExit skips the kill prompt and detaches with kill=false.

Fixes #2324

pkg/terminal/exit_test.go was generated by Claude Sonnet 5

When attached to a running process, exit prompts whether to kill it. For
scripted or repetitive sessions there was no way to answer that prompt in
advance. Add an exit -d flag that detaches from the target, leaving it
running, without prompting.

exitCommand records the intent on the terminal and handleExit skips the
kill prompt and detaches with kill=false.

Fixes go-delve#2324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exit from attached process without prompt

1 participant