* assuan-connect.c (assuan_get_pid): New function.

* assuan.h: Prototype.  Include sys/types.h for pid_t,
	and stdio.h for FILE *.
This commit is contained in:
Marcus Brinkmann 2001-11-22 03:08:07 +00:00
parent 862ef3cf1c
commit 3f1c299866
2 changed files with 10 additions and 0 deletions

View File

@ -127,3 +127,9 @@ assuan_pipe_disconnect (ASSUAN_CONTEXT ctx)
waitpid (ctx->pid, NULL, 0); /* FIXME Check return value. */ waitpid (ctx->pid, NULL, 0); /* FIXME Check return value. */
assuan_deinit_pipe_server (ctx); assuan_deinit_pipe_server (ctx);
} }
pid_t
assuan_get_pid (ASSUAN_CONTEXT ctx)
{
return ctx ? ctx->pid : -1;
}

View File

@ -21,6 +21,9 @@
#ifndef ASSUAN_H #ifndef ASSUAN_H
#define ASSUAN_H #define ASSUAN_H
#include <stdio.h>
#include <sys/types.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#if 0 #if 0
@ -100,6 +103,7 @@ void assuan_deinit_pipe_server (ASSUAN_CONTEXT ctx);
AssuanError assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name, AssuanError assuan_pipe_connect (ASSUAN_CONTEXT *ctx, const char *name,
char *const argv[]); char *const argv[]);
void assuan_pipe_disconnect (ASSUAN_CONTEXT ctx); void assuan_pipe_disconnect (ASSUAN_CONTEXT ctx);
pid_t assuan_get_pid (ASSUAN_CONTEXT ctx);
/*-- assuan-util.c --*/ /*-- assuan-util.c --*/
void assuan_set_malloc_hooks ( void *(*new_alloc_func)(size_t n), void assuan_set_malloc_hooks ( void *(*new_alloc_func)(size_t n),