Web lists-archives.com

Re: Can't read stdout of bash with GSubprocess on MSYS2




On 9/27/2015 10:01 PM, Gang Chen wrote:
> Hi,
> I'm writing a GTK+ application with MINGW-W64, which spawns a subprocess
> running bash to execute some commands with GSubprocess and reads stdout
> of bash (installed from MSYS2). I found that if compiled without
> "-mwindows" compilation option the main process can read the stdout,
> while with "-mwindows", the read function always returns 0 bytes read.
> If the main process runs a normal console program, or like
> "mingw32/bin/gcc.exe", then it can read stdout even if compiled with
> "-mwindows".

The -mwindows option tells the compiler to not include the code to use
CONSOLE code such that stdin, stdout and stderr are not open.  Knowing
this what you describe makes sense.

--
Earnie
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list