Grid Community Toolkit  6.2.1629922860 (tag: v6.2.20210826)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
myproxy_popen.h
1 /*
2  * myproxy_popen.h
3  *
4  * Provide a safe popen substitute.
5  *
6  */
7 
8 #ifndef __MYPROXY_POPEN_H
9 #define __MYPROXY_POPEN_H
10 
11 /*
12  * myproxy_popen()
13  *
14  * Run the program at the specified path with the specified arguments
15  * (3rd argument is argv[1], 4th argument is argv[2]).
16  * The final argument must be NULL.
17  * Returns pid of the child process on success.
18  * Returns -1 on failure and sets verror.
19  * On success, fds[0] is a pipe connected to the child's stdin for writing
20  * fds[1] is a pipe connected to the child's stdout for reading
21  * fds[2] is a pipe connected to the child's stderr for reading
22  * The caller should reap the child via waitpid() and close the three pipes.
23  */
24 pid_t myproxy_popen(int fds[3], const char *path, ...);
25 
26 #endif /* __MYPROXY_POPEN_H */