qemu-e2k/qga
Yuri Pudgorodskiy 27559c214d qga: Workaround for console redirection from non-interactive qemu-ga service
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 <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2016-04-07 11:43:54 -05:00
..
installer qga: Workaround for console redirection from non-interactive qemu-ga service 2016-04-07 11:43:54 -05:00
vss-win32 Clean up includes some more 2016-03-22 22:20:16 +01:00
Makefile.objs qemu-ga: Call Windows VSS requester in fsfreeze command handler 2013-09-09 14:17:57 -05:00
channel-posix.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
channel-win32.c qga: Clean up includes 2016-02-04 17:41:30 +00:00
channel.h qemu-ga: move channel/transport functionality into wrapper class 2012-02-23 15:40:16 -06:00
commands-posix.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
commands-win32.c qga: check utf8-to-utf16 conversion 2016-02-25 09:48:52 -06:00
commands.c qga: fix fd leak with guest-exec i/o channels 2016-04-07 11:40:19 -05:00
guest-agent-command-state.c qga: Clean up includes 2016-02-04 17:41:30 +00:00
guest-agent-core.h qga: Support enum names in guest-file-seek 2016-02-25 09:48:50 -06:00
main.c * Log filtering from Alex and Peter 2016-03-24 21:42:40 +00:00
qapi-schema.json qga: Support enum names in guest-file-seek 2016-02-25 09:48:50 -06:00
service-win32.c qga: Clean up includes 2016-02-04 17:41:30 +00:00
service-win32.h qga: save state directory in ga_install_service() 2013-05-30 11:37:37 -05:00
vss-win32.c qga: fix w32 breakage due to missing osdep.h includes 2016-02-25 10:54:32 -06:00
vss-win32.h all: Clean up includes 2016-02-23 12:43:05 +00:00