mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Replace other use cases of gnupg_spawn_process_fd.
-- by gnupg_process_spawn Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
62496e9f30
commit
202d7b47e7
3 changed files with 58 additions and 35 deletions
|
@ -692,14 +692,15 @@ show_photo (const char *command, const char *name, const void *image, u32 len)
|
|||
log_error (_("system error while calling external program: %s\n"),
|
||||
strerror (errno));
|
||||
#else
|
||||
pid_t pid;
|
||||
gpg_error_t err;
|
||||
const char *argv[4];
|
||||
|
||||
fill_command_argv (argv, spawn->command);
|
||||
err = gnupg_spawn_process_fd (argv[0], argv+1, -1, -1, -1, &pid);
|
||||
if (!err)
|
||||
err = gnupg_wait_process (argv[0], pid, 1, NULL);
|
||||
err = gnupg_process_spawn (argv[0], argv+1,
|
||||
(GNUPG_PROCESS_STDIN_NULL
|
||||
|GNUPG_PROCESS_STDOUT_NULL
|
||||
|GNUPG_PROCESS_STDERR_NULL),
|
||||
NULL, NULL, NULL);
|
||||
if (err)
|
||||
log_error (_("unnatural exit of external program\n"));
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue