2006-09-06 Marcus Brinkmann <marcus@g10code.de>
[gnupg.git] / g10 / exec.h
blob66d13c72b5b7c4aa63ab29e8a550b737eb9f83ae
1 /* exec.h
2 * Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * GnuPG is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * GnuPG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 * USA.
22 #ifndef _EXEC_H_
23 #define _EXEC_H_
25 #include <unistd.h>
26 #include <stdio.h>
28 #include "../common/iobuf.h"
30 struct exec_info
32 int progreturn;
33 struct
35 unsigned int binary:1;
36 unsigned int writeonly:1;
37 unsigned int madedir:1;
38 unsigned int use_temp_files:1;
39 unsigned int keep_temp_files:1;
40 } flags;
41 pid_t child;
42 FILE *tochild;
43 iobuf_t fromchild;
44 char *command,*name,*tempdir,*tempfile_in,*tempfile_out;
47 int exec_write(struct exec_info **info,const char *program,
48 const char *args_in,const char *name,int writeonly,int binary);
49 int exec_read(struct exec_info *info);
50 int exec_finish(struct exec_info *info);
51 int set_exec_path(const char *path);
53 #endif /* !_EXEC_H_ */