commands.c (ead5268f2166101f7dde70598c9f538a90afd8ee) commands.c (cb8d4c8f54b8271f642f02382eec29d468bb1c77)
1/*
2 * QEMU Guest Agent common/cross-platform command implementations
3 *
4 * Copyright IBM Corp. 2012
5 *
6 * Authors:
7 * Michael Roth <mdroth@linux.vnet.ibm.com>
8 *

--- 168 unchanged lines hidden (view full) ---

177 * See MSDN for GetExitCodeProcess() and ntstatus.h for possible
178 * well-known codes, e.g. C0000005 ACCESS_DENIED - analog of SIGSEGV
179 * References:
180 * https://msdn.microsoft.com/en-us/library/windows/desktop/ms683189(v=vs.85).aspx
181 * https://msdn.microsoft.com/en-us/library/aa260331(v=vs.60).aspx
182 */
183#ifdef G_OS_WIN32
184 /* Additionally WIN32 does not provide any additional information
1/*
2 * QEMU Guest Agent common/cross-platform command implementations
3 *
4 * Copyright IBM Corp. 2012
5 *
6 * Authors:
7 * Michael Roth <mdroth@linux.vnet.ibm.com>
8 *

--- 168 unchanged lines hidden (view full) ---

177 * See MSDN for GetExitCodeProcess() and ntstatus.h for possible
178 * well-known codes, e.g. C0000005 ACCESS_DENIED - analog of SIGSEGV
179 * References:
180 * https://msdn.microsoft.com/en-us/library/windows/desktop/ms683189(v=vs.85).aspx
181 * https://msdn.microsoft.com/en-us/library/aa260331(v=vs.60).aspx
182 */
183#ifdef G_OS_WIN32
184 /* Additionally WIN32 does not provide any additional information
185 * on whetherthe child exited or terminated via signal.
186 * We use this simple range check to distingish application exit code
185 * on whether the child exited or terminated via signal.
186 * We use this simple range check to distinguish application exit code
187 * (usually value less then 256) and unhandled exception code with
188 * ntstatus (always value greater then 0xC0000005). */
189 if ((uint32_t)gei->status < 0xC0000000U) {
190 ges->has_exitcode = true;
191 ges->exitcode = gei->status;
192 } else {
193 ges->has_signal = true;
194 ges->signal = gei->status;

--- 307 unchanged lines hidden ---
187 * (usually value less then 256) and unhandled exception code with
188 * ntstatus (always value greater then 0xC0000005). */
189 if ((uint32_t)gei->status < 0xC0000000U) {
190 ges->has_exitcode = true;
191 ges->exitcode = gei->status;
192 } else {
193 ges->has_signal = true;
194 ges->signal = gei->status;

--- 307 unchanged lines hidden ---