Add keybinding command to kill current process #4689

Open
opened 2026-01-30 23:54:12 +00:00 by claunia · 2 comments
Owner

Originally created by @mahmoudajawad on GitHub (Oct 28, 2019).

Description of the new feature/enhancement

I'm copying this feature from ConEmu.

In Python development on Windows, if you run an asyncio loop then Python can't be stopped using regular KeyboardInterrupt Exception. This leaves me forced to have to close the current tab and open new one. In ConEmu this is resolved by the ability to bind keys combination to command that results in killing current PID, like:
image

Proposed technical implementation details (optional)

Terminal should be able to detect current running process in the current tab and gets its PID and offer the user the ability to force stop it using low-level Windows commands. Resulting in the process running to be killed, but the shell used to start the process kept alive and back in focus for the user to continue using the current tab using the current shell.

Originally created by @mahmoudajawad on GitHub (Oct 28, 2019). # Description of the new feature/enhancement > I'm copying this feature from ConEmu. In Python development on Windows, if you run an `asyncio` loop then Python can't be stopped using regular `KeyboardInterrupt Exception`. This leaves me forced to have to close the current tab and open new one. In ConEmu this is resolved by the ability to bind keys combination to command that results in killing current `PID`, like: ![image](https://user-images.githubusercontent.com/316734/67683312-991bc000-f9aa-11e9-8ca0-bafa39217b2f.png) # Proposed technical implementation details (optional) Terminal should be able to detect current running process in the current tab and gets its `PID` and offer the user the ability to force stop it using low-level Windows commands. Resulting in the process running to be killed, but the shell used to start the process kept alive and back in focus for the user to continue using the current tab using the current shell.
claunia added the Issue-TaskProduct-TerminalArea-UserInterface labels 2026-01-30 23:54:12 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Oct 30, 2019):

This would also be helpful for the "close tabs?" confirmation. Thanks!

@DHowett-MSFT commented on GitHub (Oct 30, 2019): This would also be helpful for the "close tabs?" confirmation. Thanks!
Author
Owner

@mahmoudajawad commented on GitHub (Oct 31, 2019):

@DHowett-MSFT Well, a tab close confirmation would be great as well, but I'm not sure if mixing them both in one issue would be satisfying for @msftbot 😁

@mahmoudajawad commented on GitHub (Oct 31, 2019): @DHowett-MSFT Well, a tab close confirmation would be great as well, but I'm not sure if mixing them both in one issue would be satisfying for @msftbot 😁
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4689