Cygwin/X - Query: why invoking from cmd backgrounds?

Jon Turney jon.turney@dronecode.org.uk
Sat Jan 20 15:46:46 GMT 2024


On 20/01/2024 08:55, Shaddy Baddah via Cygwin wrote:
> Hi,
> 
> I am just wondering if anyone understands why XWin detaches/runs in
> the background, when launched from Windows Command Prompt.

I assume this is due to XWin being marked as a GUI, not console 
application (to stop it popping up a useless console window when run 
directly e.g. via explorer or a shortcut).

> This being different to when run from Mintty.
> 
> Here's what happens with my Mintty invocation, which stays in the
[...]
> 
> Is this special detection and handling in the main() (or whatever
> entrypoint is applicable)?

This is something cmd (and powershell) does. I don't know the mechanism.

I think you can make cmd wait with 'start /w'.  Or maybe making the 
command part of a pipeline...



More information about the Cygwin mailing list