mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common/exechelp: Add general pipe function.
* common/exechelp-posix.c (gnupg_create_pipe): New function. * common/exechelp-w32.c (INHERIT_{READ,WRITE,BOTH}): New macros. (create_inheritable_pipe): Generalize so that both ends can be inherited. (do_create_pipe): Rename argument accordingly. (gnupg_create_{in,out}bound_pipe): Use new flags. (gnupg_create_pipe): New function. (gnupg_spawn_process): Use new flags. * common/exechelp-w32ce.c (gnupg_create_pipe): New stub. * common/exechelp.h (gnupg_create_pipe): New prototype. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
54acc87c1e
commit
9f4a8d4ea1
4 changed files with 59 additions and 31 deletions
|
@ -59,6 +59,11 @@ gpg_error_t gnupg_create_inbound_pipe (int filedes[2]);
|
|||
inheritable. */
|
||||
gpg_error_t gnupg_create_outbound_pipe (int filedes[2]);
|
||||
|
||||
/* Portable function to create a pipe. Under Windows both ends are
|
||||
inheritable. */
|
||||
gpg_error_t gnupg_create_pipe (int filedes[2]);
|
||||
|
||||
|
||||
#define GNUPG_SPAWN_NONBLOCK 16
|
||||
#define GNUPG_SPAWN_RUN_ASFW 64
|
||||
#define GNUPG_SPAWN_DETACHED 128
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue