Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Uncap does not detach properly from the console #29

Copy link
Copy link

Description

@ClausAndersen
Issue body actions

It seems that uncap does not detach from the console but rather minimizes it and hides the window. This works fine on a default install using the "Windows Console Host" (built-in).

This however breaks in the new and much improved Windows Terminal[1]. In the settings of Windows Terminal in "Startup" you can change "Default Terminal Application" from "Windows Console Host" to "Windows Terminal". It is easy to reproduce by simply swapping this setting.

When using the WIndows Terminal then uncap simply minimizes the window. This means that is still remains visible in the taskbar. It is clearly not being detached as you can Ctrl-C out of the process. And if the window is closed it will terminate uncap.

This becomes even more annoying as the Window Terminal support tabs. If you start uncap then the full window minimizes with all your active tabs. It does not help using cmd /c uncap as this is determined by the terminal.

Workaround: Keep "Windows Console Host" as "Default Terminal Application".

This might not be a huge issue but I would expect uncap to detach properly[2][3][4][5] as I happens with common Unix utilities. If I understand the code corretly we are currently cheating by using ShowWindow(h, SW_HIDE);

This was observed on Microsoft Windows [Version 10.0.19045.5011] using Windows Terminal 1.21.2911.0

[1] https://github.com/microsoft/terminal
[2] https://learn.microsoft.com/en-us/windows/console/freeconsole
[3] https://stackoverflow.com/a/47833689/3703638
[4] https://stackoverflow.com/questions/13168298/have-a-user-close-a-process-allocated-console-without-exiting-the-process
[5] https://stackoverflow.com/questions/432832/what-is-the-different-between-api-functions-allocconsole-and-attachconsole-1

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.