diff options
Diffstat (limited to 'src/gpg-error.h.in')
-rw-r--r-- | src/gpg-error.h.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index b7cfdcf..ce5c76a 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -1084,6 +1084,9 @@ void _gpgrt_log_assert (const char *expr, const char *file, int line, /* * Spawn functions */ +/* Internal flag to ihnerit file descriptor/handle */ +#define GPGRT_SPAWN_INHERIT_FILE 1 + #define GPGRT_SPAWN_NONBLOCK 16 /* Set the streams to non-blocking. */ #define GPGRT_SPAWN_RUN_ASFW 64 /* Use AllowSetForegroundWindow on W32. */ #define GPGRT_SPAWN_DETACHED 128 /* Start the process in the background. */ @@ -1110,14 +1113,14 @@ gpg_err_code_t gpgrt_spawn_process (const char *pgmname, const char *argv[], /* Fork and exec PGNNAME and connect the process to the given FDs. */ gpg_err_code_t gpgrt_spawn_process_fd (const char *pgmname, const char *argv[], int infd, int outfd, int errfd, - void (*after_fork_cb)(void *), - void *after_fork_cb_arg, + int (*spawn_cb) (void *), + void *spawn_cb_arg, pid_t *pid); /* Fork and exec PGMNAME as a detached process. */ gpg_err_code_t gpgrt_spawn_process_detached (const char *pgmname, const char *argv[], - const char *envp[] ); + const char *envp[]); /* Wait for a single process. */ gpg_err_code_t gpgrt_wait_process (const char *pgmname, pid_t pid, int hang, @@ -1132,6 +1135,9 @@ void gpgrt_kill_process (pid_t pid); /* Release process resources identified by PID. */ void gpgrt_release_process (pid_t pid); + +/* Close all file resources (descriptors), except KEEP_FDS. */ +void gpgrt_close_all_fds (int from, int *keep_fds); /* * Option parsing. |