From 34045ed9e1235d0d31fde218bb286e4b0d96a73e Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 30 May 2024 13:39:31 +0900 Subject: [PATCH] common: Fix process termination check at release. * src/exechelp-posix.c (gnupg_process_release): When NOT terminated, terminate and wait. * src/exechelp-w32.c (gnupg_process_release): Likewise. -- Signed-off-by: NIIBE Yutaka --- common/exechelp-posix.c | 2 +- common/exechelp-w32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c index d90b4e8c7..3f124ab80 100644 --- a/common/exechelp-posix.c +++ b/common/exechelp-posix.c @@ -997,7 +997,7 @@ gnupg_process_release (gnupg_process_t process) if (!process) return; - if (process->terminated) + if (!process->terminated) { gnupg_process_terminate (process); gnupg_process_wait (process, 1); diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c index 08290e442..d1764d1f6 100644 --- a/common/exechelp-w32.c +++ b/common/exechelp-w32.c @@ -1209,7 +1209,7 @@ gnupg_process_release (gnupg_process_t process) if (!process) return; - if (process->terminated) + if (!process->terminated) { gnupg_process_terminate (process); gnupg_process_wait (process, 1);