From 4b46af9e571f5dad8fec24c7fa30c31231a59e6f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 29 Jun 2010 17:11:03 +0000 Subject: Handle NOTIFY event. --- src/gpgcedev.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/gpgcedev.c') diff --git a/src/gpgcedev.c b/src/gpgcedev.c index c0feda9..88013d6 100644 --- a/src/gpgcedev.c +++ b/src/gpgcedev.c @@ -25,7 +25,7 @@ #include #define ENABLE_DEBUG -#warning Cancel and caller process termination not handled. +#warning Cancel not handled. /* Missing IOCTLs in the current mingw32ce. */ @@ -826,8 +826,15 @@ GPG_IOControl (DWORD opnctx_arg, DWORD code, void *inbuf, DWORD inbuflen, break; case IOCTL_PSL_NOTIFY: + /* This notification is received if the application's main + thread exits and the application has other threads running + and the application has open handles for this device. What + we do is to unblock them all simialr to an explicit unblock + call. */ log_debug ("GPG_IOControl (ctx=0x%p): code: NOTIFY\n", (void*)opnctx); - /* Unexpected process termination. */ + + if (unblock_call (opnctx)) + result = TRUE; break; default: -- cgit v1.2.3