Re: Can't read stdout of bash with GSubprocess on MSYS2
- Date: Mon, 28 Sep 2015 15:07:20 -0400
- From: Earnie <earnie@xxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: Can't read stdout of bash with GSubprocess on MSYS2
On 9/27/2015 10:01 PM, Gang Chen wrote:
> 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
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.
gtk-list mailing list