diff options
author | NIIBE Yutaka <[email protected]> | 2022-10-20 05:23:20 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2022-10-20 05:23:20 +0000 |
commit | 5ad97e8fa62882b2014a67b4e57dab3b37ccaf4c (patch) | |
tree | 7741b9acdb2a9c5f596da2e362c01d394d2b0122 /src/gpg-error.h.in | |
parent | spawn: Update changes from gnupg. (diff) | |
download | libgpg-error-5ad97e8fa62882b2014a67b4e57dab3b37ccaf4c.tar.gz libgpg-error-5ad97e8fa62882b2014a67b4e57dab3b37ccaf4c.zip |
gpgrt_spawn_process, gpgrt_spawn_process_fd: Change the API.
* src/gpg-error.h.in (gpgrt_spawn_process): Remove PREEXEC argument.
(gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG.
* src/gpgrt-int.h (_gpgrt_spawn_process): Remove PREEXEC argument.
(_gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG.
* src/spawn-posix.c (do_exec): Remove PREEXEC argument.
(_gpgrt_spawn_process): Remove PREEXEC argument.
(_gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG.
(_gpgrt_spawn_process_detached): Follow the change of do_exec.
* src/spawn-w32.c (_gpgrt_spawn_process): Remove PREEXEC argument.
(_gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG.
* src/visibility.c (gpgrt_spawn_process): Remove PREEXEC argument.
(gpgrt_spawn_process_fd): Add AFTER_FORK_CB and AFTER_FORK_CB_ARG.
--
GnuPG-bug-id: 6249
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'src/gpg-error.h.in')
-rw-r--r-- | src/gpg-error.h.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index 161a3ad..aca7243 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -1103,8 +1103,7 @@ gpg_err_code_t gpgrt_make_pipe (int filedes[2], gpgrt_stream_t *r_fp, /* Fork and exec PGMNAME. */ gpg_err_code_t gpgrt_spawn_process (const char *pgmname, const char *argv[], - int *execpt, void (*preexec)(void), - unsigned int flags, + int *execpt, unsigned int flags, gpgrt_stream_t *r_infp, gpgrt_stream_t *r_outfp, gpgrt_stream_t *r_errfp, @@ -1113,6 +1112,8 @@ 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, pid_t *pid); /* Fork and exec PGMNAME as a detached process. */ |