Commit da8904d1 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

wineboot: Don't abort shutdown if we have to terminate a process.

We can sometimes get a FALSE result from WM_QUERYENDSESSION as a side-effect of terminating a process. We should continue the shutdown process in this case.
parent 4f30ff87
......@@ -113,6 +113,7 @@ struct endtask_dlg_data
{
struct window_info *win;
BOOL cancelled;
BOOL terminated;
};
static INT_PTR CALLBACK endtask_dlg_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
......@@ -138,6 +139,7 @@ static INT_PTR CALLBACK endtask_dlg_proc( HWND hwnd, UINT msg, WPARAM wparam, LP
WINE_TRACE( "terminating process %04x\n", data->win[0].pid );
TerminateProcess( handle, 0 );
CloseHandle( handle );
data->terminated = TRUE;
}
return TRUE;
case MAKEWPARAM(IDCANCEL, BN_CLICKED):
......@@ -175,6 +177,7 @@ static LRESULT send_messages_with_timeout_dialog(
cb_data->window_count = count;
dlg_data.win = win;
dlg_data.terminated = FALSE;
dlg_data.cancelled = FALSE;
for (i = 0; i < count; i++)
......@@ -211,7 +214,7 @@ static LRESULT send_messages_with_timeout_dialog(
}
if (!cb_data->window_count)
{
result = cb_data->result;
result = dlg_data.terminated || cb_data->result;
HeapFree( GetProcessHeap(), 0, cb_data );
if (!result)
goto cleanup;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment