| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/assuan-defs.h (struct assuan_context_s): Introduce SERVER_PROC
member. Clarify the use of PROCESS_ID and PID.
Introduce assuan_pid_t for internal use of process id or handle.
* src/assuan.h.in: Follow the change.
* src/assuan.c (assuan_new_ext): Likewise.
* src/client.c (_assuan_client_finish): Likewise.
* src/assuan-pipe-connect.c (pipe_connect): Likewise.
* src/server.c (_assuan_server_finish): Likewise.
* src/system-posix.c: Likewise.
* src/system-w32.c: Likewise.
* src/system.c: Likewise.
* src/assuan-pipe-server.c (assuan_init_pipe_server)
[HAVE_W32_SYSTEM]: Exclude the use of _assuan_pipe_connect_pid.
* src/assuan-socket-server.c (accept_connection_bottom)
[HAVE_W32_SYSTEM]: Exclude the use of the member peercred.pid.
* src/assuan-socket.c (_assuan_sock_check_nonce): Support Cygwin
Unix domain emulation for having valid client process ID.
* src/context.c (assuan_get_pid): Clarify the use cases.
* src/posix-types.inc.h, src/w32-types.inc.h: Introduce assuan_pid_t.
--
GnuPG-bug-id: 6487
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/server.c (_assuan_server_finish): Never call waitpid here.
* src/assuan-socket-server.c (accept_connection_bottom): Indentation.
--
The waitpid/wait only makes sense by parent catching its child
process.
Since the commit 93595de1ede96dedfcaa93c7442536a2cde0b6ef (for version
0.6.5, in 2004-04-21), CTX->PID on server side has client PID.
In the commit cb53f862ff2a864da822d1c16d3df6a02157608b (2009-11-19),
call of _assuan_waitpid was introduced in assuan_server_finish, but
this call always fails because the process is not a child process of
server.
(If we could catch exit of non-child process, it might cause a dead
lock, since client does call waitpid too.)
The indentation fix is to show the place where PID is assigned.
Signed-off-by: NIIBE Yutaka <[email protected]>
|
|
|
|
| |
--
|
|
* Makefile.am (common_sources): Remove assuan-connect.c and add
client.c.
* client.c, server.c: New file.
* assuan-defs.h (_assuan_disconnect): Remove.
(struct assuan_context_s): Remove members deinit_handler.
(_assuan_client_release, _assuan_client_finish)
(_assuan_server_finish, _assuan_server_release): New.
* assuan-socket-server.c (accept_connection_bottom): Use
ASSUAN_INVALID_PID, not -1.
(finish_connection, deinit_socket_server): Remove.
(assuan_init_socket_server): Use _assuan_server_release.
* assuan-socket-connect.c (do_finish, do_deinit): Remove.
(assuan_socket_connect): Use _assuan_client_release.
* assuan-pipe-connect.c (do_finish, do_deinit): Remove.
(pipe_connect): Update deinitialization.
(socketpair_connect): Here as well.
* context.c (assuan_get_pid): New from ...
* assuan-connect.c (assuan_get_pid): ... here. Remove this file.
* assuan-pipe-server.c (_assuan_deinit_server, accept_connection)
(deinit_pipe_server, finish_connection): Remove unused function.
* assuan-listen.c (assuan_accept): Check CTX->accept_handler
before calling. Initialize RC. Do not call finish handler for
pipe server.
* assuan-uds.c (_assuan_uds_deinit): Do not call finish handler.
|