On Mon, 07 Oct 2013 12:28:49 -0700 Matthew Brush mbrush@codebrainz.ca wrote:
[...]
Any chance you could find time to review and test Geany's implementation to see if anything looks fishy?
I can simply test FiF with regex = ".", which will generate a lot of output quite fast. Without the SYNC_SPAWN patches, build.c and search.c async executions are identical (except that build checks if the returned pid after successful spawn async is > 0, but still sets the channels if it's not - I wonder why).
GTK+ 2.22 is over 3 years old by now, FWIW.
I'm using 2.22 under win~1 too, and don't think it will have any problems with async exec, but we'll see.
OT: Do you have any idea how to make g_spawn_async_with_pipes() to not open a "Command Prompt" window on Windows? My new plugin filters the document text through a subprocess very often and the popup console windows are super annoying :)
A win~1 .exe header contains a value which indicates whether it's GUI or console (or something else). For any console executable, win~1 will open a console automatically, unless one already exists (i.e. running grep from cmd will not open a new console). It's not really a "command prompt", unless you start it with system() or via cmd.
What you can do is run the executable in a mimimized [console] window. Creating a shortcut with "window = minimized" may affect the execution even if you run the .exe instead of the .pif or .lnk, and if it doesn't, you can try to run the shortcut, but I'm not sure the CLI arguments will work properly that way.
Last, you can create a small GUI subsystem wrapper which runs your console application with CreateProcess(), and use either the creation flags or the startup information to hide or minimize it.