Skip to content
Snippets Groups Projects
Commit 52f40a93 authored by Michael McCormack's avatar Michael McCormack Committed by Alexandre Julliard
Browse files

Start the reboot process in ExitWindowsEx.

parent bb66e8a1
Branches
Tags wine-960131
No related merge requests found
......@@ -412,6 +412,31 @@ static void USER_DoShutdown(void)
}
}
/***********************************************************************
* USER_StartRebootProcess (Internal)
*/
static BOOL USER_StartRebootProcess(void)
{
WCHAR winebootW[] = { 'w','i','n','e','b','o','o','t',0 };
PROCESS_INFORMATION pi;
STARTUPINFOW si;
BOOL r;
memset( &si, 0, sizeof si );
si.cb = sizeof si;
r = CreateProcessW( NULL, winebootW, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );
if (r)
{
CloseHandle( pi.hProcess );
CloseHandle( pi.hThread );
}
else
MESSAGE("wine: Failed to start wineboot\n");
return r;
}
/***********************************************************************
* ExitWindowsEx (USER32.@)
*/
......@@ -446,7 +471,10 @@ BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
/* USER_DoShutdown will kill all processes except the current process */
USER_DoShutdown();
if (flags & EWX_REBOOT)
USER_StartRebootProcess();
if (result) ExitKernel16();
return TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment