Skip to content

Avoid nil process deref on early ctrlc - #24

Merged
mattn merged 1 commit into
masterfrom
fix-ctrlc-nil
Jul 10, 2026
Merged

Avoid nil process deref on early ctrlc#24
mattn merged 1 commit into
masterfrom
fix-ctrlc-nil

Conversation

@mattn

@mattn mattn commented Jul 10, 2026

Copy link
Copy Markdown
Owner

The input reader goroutine handles a ctrlc message by dereferencing cmd.Process, but it is started before cmd.Run() launches the process. A ctrlc arriving in that window would panic with a nil pointer dereference.

Skip the ctrlc handling when cmd.Process is still nil.

@mattn
mattn merged commit b3e5a89 into master Jul 10, 2026
2 checks passed
@mattn
mattn deleted the fix-ctrlc-nil branch July 10, 2026 08:10
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.

1 participant