diff options
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | 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 <[email protected]> + + * 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 <[email protected]> * 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); } |