* 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:
parent
862ef3cf1c
commit
3f1c299866
@ -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;
|
||||
}
|
||||
|
@ -21,6 +21,9 @@
|
||||
#ifndef ASSUAN_H
|
||||
#define ASSUAN_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#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),
|
||||
|
Loading…
Reference in New Issue
Block a user