From 02bff2c62ab663fb22983f4547eea3a56f305c26 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 22 Nov 2001 03:08:07 +0000 Subject: [PATCH] * assuan-connect.c (assuan_get_pid): New function. * assuan.h: Prototype. Include sys/types.h for pid_t, and stdio.h for FILE *. --- trunk/assuan/assuan-connect.c | 6 ++++++ trunk/assuan/assuan.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/trunk/assuan/assuan-connect.c b/trunk/assuan/assuan-connect.c index 778b3a7..37d4262 100644 --- a/trunk/assuan/assuan-connect.c +++ b/trunk/assuan/assuan-connect.c @@ -127,3 +127,9 @@ assuan_pipe_disconnect (ASSUAN_CONTEXT ctx) waitpid (ctx->pid, NULL, 0); /* FIXME Check return value. */ assuan_deinit_pipe_server (ctx); } + +pid_t +assuan_get_pid (ASSUAN_CONTEXT ctx) +{ + return ctx ? ctx->pid : -1; +} diff --git a/trunk/assuan/assuan.h b/trunk/assuan/assuan.h index 97462fb..5154d56 100644 --- a/trunk/assuan/assuan.h +++ b/trunk/assuan/assuan.h @@ -21,6 +21,9 @@ #ifndef ASSUAN_H #define ASSUAN_H +#include +#include + #ifdef __cplusplus extern "C" { #if 0 @@ -100,6 +103,7 @@ void assuan_deinit_pipe_server (ASSUAN_CONTEXT ctx); AssuanError assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, char *const argv[]); void assuan_pipe_disconnect (ASSUAN_CONTEXT ctx); +pid_t assuan_get_pid (ASSUAN_CONTEXT ctx); /*-- assuan-util.c --*/ void assuan_set_malloc_hooks ( void *(*new_alloc_func)(size_t n), -- 2.26.2