Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

fix(coding-agent): ignore SIGINT while process is suspended#1668

Merged
badlogic merged 1 commit intobadlogic:mainfrom
aliou:worktree/fix-sigint-background
Feb 27, 2026
Merged

fix(coding-agent): ignore SIGINT while process is suspended#1668
badlogic merged 1 commit intobadlogic:mainfrom
aliou:worktree/fix-sigint-background

Conversation

@aliou
Copy link
Contributor

@aliou aliou commented Feb 27, 2026

When the user suspends pi with Ctrl+Z, pressing Ctrl+C in the terminal kills the backgrounded process because no SIGINT handler is active. This adds a no-op SIGINT handler before suspending and removes it on resume.

Change: packages/coding-agent/src/modes/interactive/interactive-mode.ts -- handleCtrlZ()

  • Register a no-op SIGINT handler before sending SIGTSTP
  • Remove it in the SIGCONT callback when the process resumes

Add a no-op SIGINT handler before sending SIGTSTP in handleCtrlZ().
Remove it on SIGCONT. Prevents Ctrl+C from killing the backgrounded
process.
@github-actions
Copy link
Contributor

Hi @aliou, thanks for your interest in contributing!

We ask new contributors to open an issue first before submitting a PR. This helps us discuss the approach and avoid wasted effort.

Next steps:

  1. Open an issue describing what you want to change and why (keep it concise, write in your human voice, AI slop will be closed)
  2. Once a maintainer approves with lgtm, you'll be added to the approved contributors list
  3. Then you can submit your PR

This PR will be closed automatically. See https://github.com/badlogic/pi-mono/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions bot closed this Feb 27, 2026
@badlogic badlogic reopened this Feb 27, 2026
@badlogic badlogic merged commit 0b4dea4 into badlogic:main Feb 27, 2026
3 checks passed
@aliou
Copy link
Contributor Author

aliou commented Feb 27, 2026

Thanks!

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.

2 participants