1: #ifndef LI_PROC_OPEN_H
2: #define LI_PROC_OPEN_H
3: #include "first.h"
4:
5: #include "buffer.h"
6:
7: #ifdef WIN32
8: #include <windows.h>
9: typedef HANDLE descriptor_t;
10: typedef HANDLE proc_pid_t;
11: #else
12: typedef int descriptor_t;
13: typedef pid_t proc_pid_t;
14: #endif
15:
16: typedef struct {
17: descriptor_t parent, child;
18: int fd;
19: } pipe_t;
20:
21: typedef struct {
22: pipe_t in, out, err;
23: proc_pid_t child;
24: } proc_handler_t;
25:
26: int proc_close(proc_handler_t *ht);
27: int proc_open(proc_handler_t *ht, const char *command);
28: int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err);
29:
30: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>