I'm using WSL2 on Windows 11 and I'm trying to achieve the following: I want to launch Windows applications from within WSL2 and have the Bash terminal maintain a handle to the new process. Specifically, I want to be able to quit the Windows app by pressing CTRL-C in the WSL2 terminal.
For example, when I run mpv.exe
from inside WSL2, I want to be able to terminate the mpv.exe
process by pressing CTRL-C. Essentially, I want to keep the process in the foreground in the CLI.
Does anyone have any suggestions on how to achieve this? I'd appreciate any help.
sleep 3
you can see that bash default behavior is waiting, like you want it to. If you see something different it is probably because the application specifically and intentionally evades it.