malxau / yori

Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more.
http://www.malsmith.net/yori/
MIT License
1.23k stars 31 forks source link

Process exits and yori freezes when using with Windows Terminal #29

Closed igitur closed 4 years ago

igitur commented 4 years ago

Hi,

So I followed the instructions by Scott Hanselman to install Yori and use it with Windows Terminal.

For the most part, it works great, but every now and then, when I hit Ctrl-C to kill a process, yori also freezes up. For example, simply hitting Ctrl-C while pinging something: image

I don't have this problem with Yori's own terminal, just when I use Windows Terminal. Maybe this is not a Yori issue, but rather a Windows Terminal, but I don't experience it with any of the other shells that I also use in Windows Terminal, e.g. PowerShell or msys2.

malxau commented 4 years ago

Can I ask which version of Windows Terminal you have, and which version of Yori you have? I've been trying to reproduce this, so far without success.

What I've tried:

I haven't been able to observe this behavior at all. Can you think of anything else that I can try?

One challenging case in Yori that may be related but I don't see it doing quite the same thing is nested shells. Yori first asks child processes nicely to die, and if they don't, it's willing to terminate them. This is frequently nice from a user's point of view, but when nested instances are present it can end up killing a child instance. But getting the output you showed here would require a parent instance that launches a child instance for interactive use and the parent will terminate as soon as the child terminates (ie., yori /c yori type thing.)

igitur commented 4 years ago

Ah, yes, it was a nested instance, but not deliberately. I had installed yori via the scoop package manager, which executes yori via a shim layer. I now changed my Windows Terminal to execute the underlying yori.exe directly and that solves my problem. Thanks so much.