aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--agent/ChangeLog5
-rw-r--r--agent/call-pinentry.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/agent/ChangeLog b/agent/ChangeLog
index 46f1a25d8..a10d29800 100644
--- a/agent/ChangeLog
+++ b/agent/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-14 Marcus Brinkmann <[email protected]>
+
+ * call-pinentry.c (agent_popup_message_stop): Implement kill for
+ Windows.
+
2007-08-28 Werner Koch <[email protected]>
* gpg-agent.c (main): Add option --faked-system-time.
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c
index f29d3c4af..14cc4229a 100644
--- a/agent/call-pinentry.c
+++ b/agent/call-pinentry.c
@@ -812,7 +812,16 @@ agent_popup_message_stop (ctrl_t ctrl)
else if (popup_finished)
; /* Already finished and ready for joining. */
#ifdef HAVE_W32_SYSTEM
-# warning need to implement a kill mechanism for pinentry
+ /* Older versions of assuan set PID to 0 on Windows to indicate an
+ invalid value. */
+ else if (pid != (pid_t) INVALID_HANDLE_VALUE
+ && pid != 0)
+ {
+ HANDLE process = (HANDLE) pid;
+
+ /* Arbitrary error code. */
+ TerminateProcess (process, 1);
+ }
#else
else if (pid && ((rc=waitpid (pid, NULL, WNOHANG))==-1 || (rc == pid)) )
{ /* The daemon already died. No need to send a kill. However