[test_WaitForInputIdle.tar.bz2](/uploads/a20c5b119741cd7b0b4813488854a992/test_WaitForInputIdle.tar.bz2)
Attached test replicates the problem. Basically the application does
process = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION, FALSE, GetCurrentProcessId()); ret = WaitForInputIdle(process, 0x7fffffff); assert(ret == 0);
With current wine.git WaitForInputIdle() returns WAIT_FAILED because the server call get_process_idle_event() refuses to return idle_event for the current process. If that limitation is removed then wineserver crashes, and other parts of the patch fix the crash.
-- v2: server: Remove limitation for waiting on idle_event of the current process.
From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- server/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/process.c b/server/process.c index f6d1641cb94..733b0288f72 100644 --- a/server/process.c +++ b/server/process.c @@ -1686,7 +1686,7 @@ DECL_HANDLER(get_process_idle_event) reply->event = 0; if ((process = get_process_from_handle( req->handle, PROCESS_QUERY_INFORMATION ))) { - if (process->idle_event && process != current->process) + if (process->idle_event) reply->event = alloc_handle( current->process, process->idle_event, EVENT_ALL_ACCESS, 0 ); release_object( process );
Hopefully new version of the patch makes things simpler.
This merge request was approved by Rémi Bernon.