From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoDBQ-0000F8-Ac for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoDBM-0002Yi-Vy for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:53:28 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:39557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoDBM-0002Yd-PZ for qemu-devel@nongnu.org; Thu, 07 Apr 2016 12:53:24 -0400 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Apr 2016 10:53:24 -0600 Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 9033E3E40067 for ; Thu, 7 Apr 2016 10:53:21 -0600 (MDT) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u37GrL6L30212174 for ; Thu, 7 Apr 2016 09:53:21 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u37GrLri016406 for ; Thu, 7 Apr 2016 10:53:21 -0600 From: Michael Roth Date: Thu, 7 Apr 2016 11:53:09 -0500 Message-Id: <1460047989-31816-3-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1460047989-31816-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1460047989-31816-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PULL for-2.6 2/2] qga: Workaround for console redirection from non-interactive qemu-ga service List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Yuri Pudgorodskiy , Michael Roth , "Denis V. Lunev" From: Yuri Pudgorodskiy mingw-glib uses helper process to assist gspawn() api. There are two versions of helpers, one with main() and another with WinMain() startup routines. Whenever gspawn() detects consoleless environment (and qemu-ga is running in such environment as Win32 service), it chooses helper with main() instead of WinMain. It is done by name, e.g. gspawn-win32-helper-console.exe vs gspawn-win32-helper.exe Running console-aware application like any win32 console apps from main() crt initalized process results in redirection of stdout to console created in crt startup instead of parent-provided handle connected to subprocess pipe. Thus, stdout/stderr redirection do not work correctly. The patch makes WinMain()'s version of helper be used as the only helper shipped with qemu-ga package. Using only win32 helper ensures console is created before any redirection and fixes stdout/stderr redirection issue. Signed-off-by: Yuri Pudgorodskiy Signed-off-by: Denis V. Lunev CC: Michael Roth Signed-off-by: Michael Roth --- qga/installer/qemu-ga.wxs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs index 7f92891..fa2260c 100644 --- a/qga/installer/qemu-ga.wxs +++ b/qga/installer/qemu-ga.wxs @@ -96,7 +96,7 @@ - + @@ -104,7 +104,7 @@ - + -- 1.9.1