aboutsummaryrefslogtreecommitdiffstats
path: root/common/exechelp.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2007-08-27 18:10:27 +0000
committerWerner Koch <[email protected]>2007-08-27 18:10:27 +0000
commit15d0cb42a19cc88448993d4aa7a9ca207ccc1598 (patch)
tree8625d9d35542e43d659b58c378e6c968b73bbbeb /common/exechelp.h
parenttryu harder to ignore duplicate specified keyrings and -boxes. (diff)
downloadgnupg-15d0cb42a19cc88448993d4aa7a9ca207ccc1598.tar.gz
gnupg-15d0cb42a19cc88448993d4aa7a9ca207ccc1598.zip
Implemented more gpg-agen options to support certain passphrase policies.
New tool gpg-check-pattern.
Diffstat (limited to 'common/exechelp.h')
-rw-r--r--common/exechelp.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/common/exechelp.h b/common/exechelp.h
index 9e482b778..ff7e59d39 100644
--- a/common/exechelp.h
+++ b/common/exechelp.h
@@ -28,16 +28,31 @@
arguments for the process are expected in the NULL terminated array
ARGV. The program name itself should not be included there. if
PREEXEC is not NULL, that function will be called right before the
- exec. Returns 0 on success or an error code. */
+ exec. Calling gnupg_wait_process is required. Returns 0 on
+ success or an error code. */
gpg_error_t gnupg_spawn_process (const char *pgmname, const char *argv[],
FILE *infile, FILE *outfile,
void (*preexec)(void),
FILE **statusfile, pid_t *pid);
+
+/* Simplified version of gnupg_spawn_process. This function forks and
+ then execs PGMNAME, while connecting INFD to stdin, OUTFD to stdout
+ and ERRFD to stderr (any of them may be -1 to connect them to
+ /dev/null). The arguments for the process are expected in the NULL
+ terminated array ARGV. The program name itself should not be
+ included there. Calling gnupg_wait_process is required. Returns 0
+ on success or an error code. */
+gpg_error_t gnupg_spawn_process_fd (const char *pgmname,
+ const char *argv[],
+ int infd, int outfd, int errfd,
+ pid_t *pid);
+
+
/* Wait for the process identified by PID to terminate. PGMNAME should
- be the same as suplieed to the spawn fucntion and is only used for
- diagnostics. Returns 0 if the process succeded, GPG_ERR_GENERAL for
- any failures of the spawned program or other error codes.*/
+ be the same as supplied to the spawn fucntion and is only used for
+ diagnostics. Returns 0 if the process succeded, GPG_ERR_GENERAL
+ for any failures of the spawned program or other error codes.*/
gpg_error_t gnupg_wait_process (const char *pgmname, pid_t pid);