[svn] assuan - r264 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Fri Sep 14 16:23:45 CEST 2007
Author: marcus
Date: 2007-09-14 16:23:45 +0200 (Fri, 14 Sep 2007)
New Revision: 264
Modified:
trunk/src/ChangeLog
trunk/src/assuan-pipe-connect.c
Log:
2007-09-14 Marcus Brinkmann <marcus at g10code.de>
* assuan-pipe-connect.c (do_finish) [HAVE_W32_SYSTEM]: Close
ctx->pid as handle.
(pipe_connect_w32): Save the spawned processes handle.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-09-11 10:36:23 UTC (rev 263)
+++ trunk/src/ChangeLog 2007-09-14 14:23:45 UTC (rev 264)
@@ -1,3 +1,9 @@
+2007-09-14 Marcus Brinkmann <marcus at g10code.de>
+
+ * assuan-pipe-connect.c (do_finish) [HAVE_W32_SYSTEM]: Close
+ ctx->pid as handle.
+ (pipe_connect_w32): Save the spawned processes handle.
+
2007-09-11 Marcus Brinkmann <marcus at g10code.de>
* assuan.h: Use _WIN32 instead of HAVE_W32_SYSTEM.
Modified: trunk/src/assuan-pipe-connect.c
===================================================================
--- trunk/src/assuan-pipe-connect.c 2007-09-11 10:36:23 UTC (rev 263)
+++ trunk/src/assuan-pipe-connect.c 2007-09-14 14:23:45 UTC (rev 264)
@@ -129,11 +129,15 @@
_assuan_waitpid (ctx->pid, NULL, 0);
ctx->pid =(pid_t)(-1);
#endif
-#endif /*!HAVE_W32_SYSTEM*/
+#else /*!HAVE_W32_SYSTEM*/
+ CloseHandle ((HANDLE) ctx->pid);
+ ctx->pid = (pid_t) INVALID_HANDLE_VALUE;
+#endif /*HAVE_W32_SYSTEM*/
}
return 0;
}
+
static void
do_deinit (assuan_context_t ctx)
{
@@ -804,8 +808,7 @@
ResumeThread (pi.hThread);
CloseHandle (pi.hThread);
- (*ctx)->pid = 0; /* We don't use the PID. */
- CloseHandle (pi.hProcess); /* We don't need to wait for the process. */
+ (*ctx)->pid = (pid_t) pi.hProcess;
return initial_handshake (ctx);
}
More information about the Gnupg-commits
mailing list