mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-05 12:31:50 +01:00
common: New helper function gnupg_close_pipe.
* common/exechelp-posix.c (gnupg_close_pipe): New. * common/exechelp-w32.c (gnupg_close_pipe): New. -- This function is mainly for documentation purposes and should be used along with gnupg_create_pipe. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2cd8bae23d
commit
2042f5a464
@ -416,6 +416,15 @@ gnupg_create_pipe (int filedes[2])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Close the end of a pipe. */
|
||||||
|
void
|
||||||
|
gnupg_close_pipe (int fd)
|
||||||
|
{
|
||||||
|
if (fd != -1)
|
||||||
|
close (fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Fork and exec the PGMNAME, see exechelp.h for details. */
|
/* Fork and exec the PGMNAME, see exechelp.h for details. */
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
gnupg_spawn_process (const char *pgmname, const char *argv[],
|
gnupg_spawn_process (const char *pgmname, const char *argv[],
|
||||||
|
@ -397,6 +397,15 @@ gnupg_create_pipe (int filedes[2])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Close the end of a pipe. */
|
||||||
|
void
|
||||||
|
gnupg_close_pipe (int fd)
|
||||||
|
{
|
||||||
|
if (fd != -1)
|
||||||
|
close (fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Fork and exec the PGMNAME, see exechelp.h for details. */
|
/* Fork and exec the PGMNAME, see exechelp.h for details. */
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
gnupg_spawn_process (const char *pgmname, const char *argv[],
|
gnupg_spawn_process (const char *pgmname, const char *argv[],
|
||||||
|
@ -69,6 +69,9 @@ gpg_error_t gnupg_create_outbound_pipe (int filedes[2],
|
|||||||
inheritable. */
|
inheritable. */
|
||||||
gpg_error_t gnupg_create_pipe (int filedes[2]);
|
gpg_error_t gnupg_create_pipe (int filedes[2]);
|
||||||
|
|
||||||
|
/* Close the end of a pipe. */
|
||||||
|
void gnupg_close_pipe (int fd);
|
||||||
|
|
||||||
|
|
||||||
#define GNUPG_SPAWN_NONBLOCK 16
|
#define GNUPG_SPAWN_NONBLOCK 16
|
||||||
#define GNUPG_SPAWN_RUN_ASFW 64
|
#define GNUPG_SPAWN_RUN_ASFW 64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user