diff options
author | Marcus Brinkmann <[email protected]> | 2007-09-27 13:01:54 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2007-09-27 13:01:54 +0000 |
commit | 37ac53e74c6dd66c3df2ad052ef0302cf90cf4b0 (patch) | |
tree | b119cced434baf2903f87527dafcc39bed26d918 /assuan/assuan-pipe-connect.c | |
parent | doc/ (diff) | |
download | gpgme-37ac53e74c6dd66c3df2ad052ef0302cf90cf4b0.tar.gz gpgme-37ac53e74c6dd66c3df2ad052ef0302cf90cf4b0.zip |
2007-09-27 Marcus Brinkmann <[email protected]>
* assuan-pipe-connect.c (pipe_connect_gpgme): Do not close process
handle here. Use this function also on Unix systems.
gpgme/
2007-09-27 Marcus Brinkmann <[email protected]>
* w32-glib-io.c (_gpgme_io_spawn),
w32-qt-io.cpp (_gpgme_io_spawn), w32-io.c (_gpgme_io_spawn): Close
the process handle, return 0.
tests/
2007-09-27 Marcus Brinkmann <[email protected]>
* t-engine-info.c (check_engine_info): Fix debug output.
* gpg/Makefile.am (tests_unix): New variable.
(TESTS): Use it.
* gpg/t-support.h (passphrase_cb) [HAVE_W32_SYSTEM]: Use WriteFile instead of write.
* gpg/t-wait.c [HAVE_W32_SYSTEM]: Define sleep as _sleep.
Diffstat (limited to '')
-rw-r--r-- | assuan/assuan-pipe-connect.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/assuan/assuan-pipe-connect.c b/assuan/assuan-pipe-connect.c index 359eb494..e38b7877 100644 --- a/assuan/assuan-pipe-connect.c +++ b/assuan/assuan-pipe-connect.c @@ -181,6 +181,8 @@ initial_handshake (assuan_context_t *ctx) } +#ifndef _ASSUAN_IN_GPGME_BUILD_ASSUAN + #ifndef HAVE_W32_SYSTEM #define pipe_connect pipe_connect_unix /* Unix version of the pipe connection code. We use an extra macro to @@ -365,6 +367,7 @@ pipe_connect_unix (assuan_context_t *ctx, return initial_handshake (ctx); } #endif /*!HAVE_W32_SYSTEM*/ +#endif /* _ASSUAN_IN_GPGME_BUILD_ASSUAN */ #ifndef HAVE_W32_SYSTEM @@ -550,6 +553,7 @@ socketpair_connect (assuan_context_t *ctx, + #ifdef _ASSUAN_IN_GPGME_BUILD_ASSUAN #define pipe_connect pipe_connect_gpgme @@ -570,7 +574,7 @@ pipe_connect_gpgme (assuan_context_t *ctx, void *atforkvalue) { assuan_error_t err; - int pid; + int res; int rp[2]; int wp[2]; char mypidstr[50]; @@ -631,8 +635,8 @@ pipe_connect_gpgme (assuan_context_t *ctx, child_fds[2].fd = -1; /* Start the process. */ - pid = _gpgme_io_spawn (name, argv, child_fds, child_fds); - if (pid == -1) + res = _gpgme_io_spawn (name, argv, child_fds, child_fds); + if (res == -1) { _assuan_log_printf ("CreateProcess failed: %s\n", strerror (errno)); _gpgme_io_close (rp[0]); @@ -642,12 +646,8 @@ pipe_connect_gpgme (assuan_context_t *ctx, return _assuan_error (ASSUAN_General_Error); } - /* ERR contains the PID. */ (*ctx)->pid = 0; /* We don't use the PID. */ - /* FIXME: Should be done by GPGME. */ - CloseHandle ((HANDLE) pid); /* We don't need to wait for the process. */ - return initial_handshake (ctx); } |