mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
posix: Fix for spawn_cb.
--
Fixes: 7571fd4cd0
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
7571fd4cd0
commit
60b6cfe71f
3 changed files with 11 additions and 8 deletions
|
@ -302,12 +302,12 @@ copy_buffer_flush (struct copy_buffer *c, estream_t sink)
|
|||
|
||||
|
||||
static int
|
||||
close_all_except (void *arg)
|
||||
setup_close_all (struct spawn_cb_arg *sca)
|
||||
{
|
||||
int *exceptclose = arg;
|
||||
int *user_except = sca->arg;
|
||||
|
||||
close_all_fds (3, exceptclose);
|
||||
return 1;
|
||||
sca->except_fds = user_except;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Run the program PGMNAME with the command line arguments given in
|
||||
|
@ -424,7 +424,7 @@ gnupg_exec_tool_stream (const char *pgmname, const char *argv[],
|
|||
: GNUPG_PROCESS_STDIN_NULL)
|
||||
| GNUPG_PROCESS_STDOUT_PIPE
|
||||
| GNUPG_PROCESS_STDERR_PIPE),
|
||||
close_all_except, exceptclose, &proc);
|
||||
setup_close_all, exceptclose, &proc);
|
||||
gnupg_process_get_streams (proc, GNUPG_PROCESS_STREAM_NONBLOCK,
|
||||
input? &infp : NULL, &outfp, &errfp);
|
||||
if (extrapipe[0] != -1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue