From 14645b06a79f726965ae11d17db69a9521de6a2d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 3 Jan 2022 16:59:50 +0100 Subject: [PATCH] server: Don't return image information for terminating processes. Fixes a test failure caused by 8eacd3e50792925cbd209f8a1940f3e96b725137. Signed-off-by: Alexandre Julliard --- server/process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/process.c b/server/process.c index bcb66271771..58ae97cdb2f 100644 --- a/server/process.c +++ b/server/process.c @@ -1503,7 +1503,10 @@ DECL_HANDLER(get_process_info) reply->session_id = process->session_id; reply->machine = process->machine; if (get_reply_max_size()) - set_reply_data( &process->image_info, min( sizeof(process->image_info), get_reply_max_size() )); + { + if (!process->running_threads) set_error( STATUS_PROCESS_IS_TERMINATING ); + else set_reply_data( &process->image_info, min( sizeof(process->image_info), get_reply_max_size() )); + } release_object( process ); } }