common/exechelp: Add general pipe function.
authorJustus Winter <justus@g10code.com>
Thu, 14 Jan 2016 13:14:25 +0000 (14:14 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 23 Feb 2016 10:58:52 +0000 (11:58 +0100)
commit9f4a8d4ea173b4b4cb4d4f06b4004d43e2f4b97a
treec37c3538628bcabf8b8f389f7653c7e1b683a766
parent54acc87c1e0b100accbfd02cfce59a897f2f0ce1
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>
common/exechelp-posix.c
common/exechelp-w32.c
common/exechelp-w32ce.c
common/exechelp.h