[Pkg-gnupg-commit] [libassuan] 211/437: 2007-09-14 Marcus Brinkmann <marcus at g10code.de>

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit 5002babafc9ebda04ab0b55aaf7ad1b33282a505
Author: Marcus Brinkmann <mb at g10code.com>
Date:   Fri Sep 14 14:23:45 2007 +0000

    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.
---
 src/ChangeLog             | 6 ++++++
 src/assuan-pipe-connect.c | 9 ++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index f7b4f91..25e0875 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/assuan-pipe-connect.c b/src/assuan-pipe-connect.c
index a85b5cc..6ba3e71 100644
--- a/src/assuan-pipe-connect.c
+++ b/src/assuan-pipe-connect.c
@@ -129,11 +129,15 @@ do_finish (assuan_context_t ctx)
         _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 @@ pipe_connect_w32 (assuan_context_t *ctx,
 
   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);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list