Re: Can't read stdout of bash with GSubprocess on MSYS2
- From: Earnie <earnie users sourceforge net>
- To: Gang Chen <gang chen cn gmail com>, gtk-list <gtk-list gnome org>
- Subject: Re: Can't read stdout of bash with GSubprocess on MSYS2
- Date: Mon, 28 Sep 2015 15:07:20 -0400
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]