Interrupt (ctrl+c) closes Windows Terminal instead of the currently running program #12277

Closed
opened 2026-01-31 03:11:04 +00:00 by claunia · 5 comments
Owner

Originally created by @bogdanm on GitHub (Jan 29, 2021).

Environment

Windows build number:

Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0

Windows Terminal version: Windows Terminal Preview version 1.6.10272.0 (but note that this also happened in previous versions)

Powershell version:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  610

Steps to reproduce

  • Open a Powershell window in Windows Terminal.
  • Install Lua 5.1, for example using "scoop" (scoop install lua-for-windows) (my version is 5.1.5-52). NOTE: this behavior was noticed in other programs too, not just the Lua REPL (for example, the Python 3.8.7 REPL behaves in the exact same way).
  • Start the Lua REPL ("lua")
  • Press CTRL+C after the REPL starts.

Expected behavior

The Lua REPL exists and the Powershell prompt is displayed again.

Actual behavior

The Powershell window closes completely. If the Powershell window was the single window inside Windows Terminal, then Windows Terminal exits too.

Other information

This doesn't happen if I run Powershell separately (Win+R then "powershell"). In this case, the Lua REPL exists as expected.

This doesn't happen if I run the lua REPL in a command prompt window (not Powershell) inside Windows Terminal. Again, in this case, the Lua REPL exists as expected.

Originally created by @bogdanm on GitHub (Jan 29, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment Windows build number: ``` Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0 ``` Windows Terminal version: Windows Terminal Preview version 1.6.10272.0 (but note that this also happened in previous versions) Powershell version: ``` Major Minor Build Revision ----- ----- ----- -------- 5 1 19041 610 ``` # Steps to reproduce - Open a Powershell window in Windows Terminal. - Install Lua 5.1, for example using "scoop" (`scoop install lua-for-windows`) (my version is 5.1.5-52). **NOTE**: this behavior was noticed in other programs too, not just the Lua REPL (for example, the Python 3.8.7 REPL behaves in the exact same way). - Start the Lua REPL ("lua") - Press CTRL+C after the REPL starts. # Expected behavior The Lua REPL exists and the Powershell prompt is displayed again. # Actual behavior The Powershell window closes completely. If the Powershell window was the single window inside Windows Terminal, then Windows Terminal exits too. # Other information This doesn't happen if I run Powershell separately (Win+R then "powershell"). In this case, the Lua REPL exists as expected. This doesn't happen if I run the lua REPL in a command prompt window (not Powershell) inside Windows Terminal. Again, in this case, the Lua REPL exists as expected.
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 03:11:04 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jan 29, 2021):

This sounds a lot like #4899. That one was using pwsh 7 from scoop, but I wonder if installing Lua from scoop would do the same thing.

/cc @DHowett

@zadjii-msft commented on GitHub (Jan 29, 2021): This sounds _a lot_ like #4899. That one was using pwsh 7 from `scoop`, but I wonder if installing Lua from `scoop` would do the same thing. /cc @DHowett
Author
Owner

@bogdanm commented on GitHub (Jan 29, 2021):

Thanks for your reply. It might be a different issue here though:

  • I did not install Powershell via scoop
  • The same thing happens when I run the Python 3.8.7 REPL (which is not installed via scoop either).
@bogdanm commented on GitHub (Jan 29, 2021): Thanks for your reply. It might be a different issue here though: - I did not install Powershell via `scoop` - The same thing happens when I run the Python 3.8.7 REPL (which is not installed via `scoop` either).
Author
Owner

@bogdanm commented on GitHub (Jan 29, 2021):

I just did another experiment:

The exact same thing happened. It looks like a lot of programs that expose a REPL-like interface are affected.

@bogdanm commented on GitHub (Jan 29, 2021): I just did another experiment: - I downloaded the SQLite CLI from https://sqlite.org/download.html (https://sqlite.org/2021/sqlite-tools-win32-x86-3340100.zip) and unpacked it somewhere in my PATH. - I ran `sqlite3` from Powershell inside Windows Terminal. The exact same thing happened. It looks like a lot of programs that expose a REPL-like interface are affected.
Author
Owner

@skyline75489 commented on GitHub (Feb 2, 2021):

What's the version of your PowerShell & PSReadline? I can't reproduce this issue on my machine.

@skyline75489 commented on GitHub (Feb 2, 2021): What's the version of your PowerShell & PSReadline? I can't reproduce this issue on my machine.
Author
Owner

@bogdanm commented on GitHub (Feb 2, 2021):

What's the version of your PowerShell & PSReadline? I can't reproduce this issue on my machine.

Unfortunately I didn't write down the previous version of the PSReadline package on my machine, however I updated it using the instructions from https://github.com/PowerShell/PSReadLine/ and now everything works as expected. Thank you, I didn't even think about PSReadline as a possible cause for this issue.

@bogdanm commented on GitHub (Feb 2, 2021): > What's the version of your PowerShell & PSReadline? I can't reproduce this issue on my machine. Unfortunately I didn't write down the previous version of the PSReadline package on my machine, however I updated it using the instructions from https://github.com/PowerShell/PSReadLine/ and now everything works as expected. Thank you, I didn't even think about PSReadline as a possible cause for this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12277