11 #ifndef TOR_PROCESS_WIN32_H
12 #define TOR_PROCESS_WIN32_H
24 struct process_win32_t;
25 typedef struct process_win32_t process_win32_t;
27 process_win32_t *process_win32_new(
void);
28 void process_win32_free_(process_win32_t *win32_process);
29 #define process_win32_free(s) \
30 FREE_AND_NULL(process_win32_t, process_win32_free_, (s))
32 void process_win32_init(
void);
33 void process_win32_deinit(
void);
36 bool process_win32_terminate(
struct process_t *process);
38 process_pid_t process_win32_get_pid(
struct process_t *process);
40 int process_win32_write(
struct process_t *process, buf_t *buffer);
41 int process_win32_read_stdout(
struct process_t *process, buf_t *buffer);
42 int process_win32_read_stderr(
struct process_t *process, buf_t *buffer);
44 void process_win32_trigger_completion_callbacks(
void);
47 void process_win32_timer_start(
void);
48 void process_win32_timer_stop(
void);
49 bool process_win32_timer_running(
void);
51 #ifdef PROCESS_WIN32_PRIVATE
56 struct process_win32_handle_t;
57 typedef struct process_win32_handle_t process_win32_handle_t;
59 typedef enum process_win32_pipe_type_t {
61 PROCESS_WIN32_PIPE_TYPE_READER,
64 PROCESS_WIN32_PIPE_TYPE_WRITER
65 } process_win32_pipe_type_t;
67 STATIC bool process_win32_create_pipe(HANDLE *,
69 SECURITY_ATTRIBUTES *,
70 process_win32_pipe_type_t);
72 STATIC void process_win32_cleanup_handle(process_win32_handle_t *handle);
74 STATIC VOID WINAPI process_win32_stdout_read_done(DWORD,
77 STATIC VOID WINAPI process_win32_stderr_read_done(DWORD,
80 STATIC VOID WINAPI process_win32_stdin_write_done(DWORD,
84 STATIC int process_win32_read_from_handle(process_win32_handle_t *,
86 LPOVERLAPPED_COMPLETION_ROUTINE);
87 STATIC bool process_win32_handle_read_completion(process_win32_handle_t *,
91 STATIC char *format_win_cmdline_argument(
const char *arg);
92 STATIC char *tor_join_win_cmdline(
const char *argv[]);
Header for compat_libevent.c.
Headers for util_malloc.c.