turbo icon indicating copy to clipboard operation
turbo copied to clipboard

Ctrl-C from Powershell is not resulting in underlying tasks being shut down

Open chris-olszewski opened this issue 11 months ago • 5 comments

  • The output of turbo info:
turbo info
turbo 2.3.3

CLI:
   Version: 2.3.3
   Path to executable: ....\node_modules\turbo-windows-64\bin\turbo.exe
   Daemon status: Not running
   Package manager: berry

Platform:
   Architecture: x86_64
   Operating system: windows
   WSL: false
   Available memory (MB): 35060
   Available CPU cores: 24

Environment:
   CI: None
   Terminal (TERM): unknown
   Terminal program (TERM_PROGRAM): unknown
   Terminal program version (TERM_PROGRAM_VERSION): unknown
   Shell (SHELL): unknown
   stdin: false

Note that I'm running the command from a Windows Powershell terminal, but CMD has the same behavior too.

  • The command being used to invoke turbo: turbo run preview
  • How the signal is being sent to turbo: Ctrl+C on the terminal window

If it helps, below is the process hierarchy, see the dangling processes:

Image

Hope it helps @chris-olszewski

Originally posted by @erhan-talarian in #9694

chris-olszewski avatar Jan 21 '25 15:01 chris-olszewski

@erhan-talarian I think I'm able to reproduce on my Windows machine. Just a few follow ups:

  • Can you confirm that you're using the streamed logs (--ui=stream)?
  • Do you get the same behavior if you don't use global turbo? e.g. yarn run preview (you will need a top level "preview": "turbo run preview" script)
  • Does Ctrl-C result in turbo exiting or do you need to end the process?

chris-olszewski avatar Jan 22 '25 14:01 chris-olszewski

Hey @chris-olszewski

  • No, I'm using tui mode
  • Yes, the same behavior
  • turbo process exits, don't have to end it

erhan-talarian avatar Jan 22 '25 15:01 erhan-talarian

@erhan-talarian Could you show the process tree once turbo has exited via a Ctrl-C press?

chris-olszewski avatar Jan 22 '25 17:01 chris-olszewski

I'm having the same issue. Here are my process trees:

Before: Image

On CTRL+C I managed to capture this (the PIDs are different than previous screenshot as it was a different run): Image

All that is left in the tree afterwards is pwsh.exe: Image

The other processes are now on their own without a parent: Image

Let me know if you need me to run/try something else, I've been having this issue for a while so I'm keen to get it resolved.

benscobie avatar Jan 26 '25 11:01 benscobie

I'm not 100% sure what happened, but Ctrl-C using PowerShell in VSC is now working fine for me. I recently got upgraded to the March 2025 VSC update so that might've been it 🤷 . I've been testing recent turbo releases (up to 2.4.4) and it was still broken then.

benscobie avatar Apr 07 '25 11:04 benscobie