diff options
author | Marcus Brinkmann <[email protected]> | 2007-09-14 14:25:02 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2007-09-14 14:25:02 +0000 |
commit | 58278955a7e4ac62ca71966a9672eea4bd50b43b (patch) | |
tree | bb055049a6fa899c492d2422640b0675c83c7b9c | |
parent | Print used library version with --version. (diff) | |
download | gnupg-58278955a7e4ac62ca71966a9672eea4bd50b43b.tar.gz gnupg-58278955a7e4ac62ca71966a9672eea4bd50b43b.zip |
2007-09-14 Marcus Brinkmann <[email protected]>
* call-pinentry.c (agent_popup_message_stop): Implement kill for
Windows.
Diffstat (limited to '')
-rw-r--r-- | agent/ChangeLog | 5 | ||||
-rw-r--r-- | agent/call-pinentry.c | 11 |
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 |