diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-10-31 11:07:57 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-10-31 11:07:57 +0900 |
commit | 6c20e8393eba4a9f330143b2158e28ea594cbadd (patch) | |
tree | e36258183639ef2df818806168e3ea34351ec89e /src/gpg-error.def.in | |
parent | 43c1e85fe29a52a9debc068d97c5860a4694b821 (diff) | |
download | libgpg-error-6c20e8393eba4a9f330143b2158e28ea594cbadd.tar.gz |
spawn: Fix spawn_cb of gpgrt_spawn_process_fd.
* src/gpg-error.def.in (gpgrt_close_all_fds): New.
* src/gpg-error.vers (gpgrt_close_all_fds): New.
* src/gpg-error.h.in (GPGRT_SPAWN_INHERIT_FILE): New.
(gpgrt_spawn_process_fd): SPAWN_CB having return value.
* src/gpgrt-int.h (_gpgrt_spawn_process_fd): SPAWN_CB change.
* src/spawn-posix.c (_gpgrt_close_all_fds): Rename from close_all_fds,
and export it.
(do_exec): Support the case not closing fds.
(_gpgrt_spawn_process_fd): Handle return value of SPAWN_CB to
determine closing all fds or not.
* src/spawn-w32.c (_gpgrt_spawn_process_fd): Run SPAWN_CB.
(_gpgrt_close_all_fds): New.
* src/visibility.c (gpgrt_close_all_fds): New.
* src/visibility.h (gpgrt_close_all_fds): New.
--
Now, we have the API of gpgrt_spawn_process_fd for POSIX and Windows.
Giving portable semantics for spawning a process is difficult, and it
is still difficult for users to writing a function for SPAWN_CB with
portability, but gpgrt_spawn_process_fd gives the feature of spawning
a process.
GnuPG-bug-id: 6249
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'src/gpg-error.def.in')
-rw-r--r-- | src/gpg-error.def.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in index ac8f2f6..f94c6f4 100644 --- a/src/gpg-error.def.in +++ b/src/gpg-error.def.in @@ -242,4 +242,6 @@ EXPORTS gpgrt_utf8_to_wchar @186 gpgrt_wchar_to_utf8 @187 + gpgrt_close_all_fds @188 + ;; end of file with public symbols for Windows. |