1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

spawn: Remove spawn callback, introduce gnupg_spawn_actions.

* common/exechelp-posix.c (call_spawn_cb): Remove.
(gnupg_spawn_actions_new, gnupg_spawn_actions_release)
(gnupg_spawn_actions_set_environ, gnupg_spawn_actions_set_atfork)
(gnupg_spawn_actions_set_redirect)
(gnupg_spawn_actions_set_inherit_fds): New.
(my_exec, spawn_detached): Use spawn actions.
(gnupg_spawn_helper): Remove.
(gnupg_process_spawn): Remove callback, introduce gnupg_spawn_actions.
* common/exechelp-w32.c: Ditto.
* common/exechelp.h: Ditto.
* agent/genkey.c (do_check_passphrase_pattern): Follow the change of
gnupg_process_spawn API.
* common/asshelp.c (start_new_service): Likewise.
* common/exectool.c (gnupg_exec_tool_stream): Likewise.
* common/t-exechelp.c (test_pipe_stream): Likewise.
* dirmngr/ldap-wrapper.c (ldap_wrapper): Likewise.
* g10/photoid.c (run_with_pipe): Likewise.
* scd/app.c (report_change): Likewise.
* tests/gpgscm/ffi.c (do_process_spawn_io, do_process_spawn_fd):
Likewise.
* tools/gpg-card.c (cmd_gpg): Likewise.
* tools/gpgconf-comp.c (gpg_agent_runtime_change): Likewise.
(scdaemon_runtime_change, tpm2daemon_runtime_change)
(dirmngr_runtime_change, keyboxd_runtime_change)
(gc_component_launch, gc_component_check_options)
(retrieve_options_from_program): Likewise.
* tools/gpgconf.c (show_versions_via_dirmngr): Likewise.
* tools/gpgtar-create.c (gpgtar_create): Likewise.
* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
* tools/gpgtar-list.c (gpgtar_list): Likewise.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2024-05-31 15:36:39 +09:00
parent 34045ed9e1
commit fc3fde1bde
No known key found for this signature in database
GPG key ID: 640114AF89DE6054
17 changed files with 351 additions and 181 deletions

View file

@ -601,7 +601,7 @@ run_with_pipe (struct spawn_info *info, const void *image, u32 len)
fill_command_argv (argv, info->command);
err = gnupg_process_spawn (argv[0], argv+1, GNUPG_PROCESS_STDIN_PIPE,
NULL, NULL, &proc);
NULL, &proc);
if (err)
log_error (_("unable to execute shell '%s': %s\n"),
argv[0], gpg_strerror (err));
@ -695,7 +695,7 @@ show_photo (const char *command, const char *name, const void *image, u32 len)
const char *argv[4];
fill_command_argv (argv, spawn->command);
err = gnupg_process_spawn (argv[0], argv+1, 0, NULL, NULL, NULL);
err = gnupg_process_spawn (argv[0], argv+1, 0, NULL, NULL);
if (err)
log_error (_("unnatural exit of external program\n"));
#endif