Nessesarius / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

msys version quickly shows and closes another console window before opening the final one #200

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Launch the MSYS version of mintty instead of the Cygwin version (with the 
same arguments that you'd normally use).
2. Watch closely the windows that appear.

What is the expected output? What do you see instead?

I'd expect to only see a single window opening, the final mintty window. 
Instead, some sort of helper window seems to open and close very quickly before 
the final mintty window is shown.

What version of the product are you using? On what operating system?

mintty 0.8 beta 1 on Vista x64.

Please provide any additional information below.

Maybe this is caused by the MSYS version being compiled as a command line 
program (entry point "main") instead of a GUI program (entry point "WinMain")?

Original issue reported on code.google.com by sschuberth on 14 Jul 2010 at 8:33

GoogleCodeExporter commented 8 years ago
The window that flashes up indeed is a console window. You get the same effect 
with rxvt. Here's the explanation from child.c.

  Some native console programs require a console to be attached to the
  process, otherwise they pop one up themselves, which is rather annoying.
  Cygwin's exec function from 1.5 onwards automatically allocates a console
  on an invisible window station if necessary. Unfortunately that trick no
  longer works on Windows 7, which is why Cygwin 1.7 contains a new hack
  for creating the invisible console.
  On Cygwin versions before 1.5 and on Cygwin 1.5 running on Windows 7,
  we need to create the invisible console ourselves. The hack here is not
  as clever as Cygwin's, with the console briefly flashing up on startup,
  but it'll do.

MSYS is a fork Cygwin 1.3, so it doesn't have the invisible console code. You 
could try removing mintty's hack and see whether any programs you'd run in 
msysgit actually do pop up a console without it.

Mintty itself is built as a GUI program (due to the -mwindows link option).

Original comment by andy.koppe on 14 Jul 2010 at 1:11

GoogleCodeExporter commented 8 years ago

Original comment by andy.koppe on 18 Jul 2010 at 5:09