diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2012-02-13 00:59:49 -0800 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-02-17 11:42:20 -0500 |
commit | c0808b795f9b52184a18e7a2960f56ed0e330c4b (patch) | |
tree | 0a9ef6fda76d734ffef261c196262bcd10c9cf33 /src/common/util.h | |
parent | ee3a49d6ed157b0d27a31f527bc5a55d0b2dad9d (diff) | |
download | tor-c0808b795f9b52184a18e7a2960f56ed0e330c4b.tar.gz tor-c0808b795f9b52184a18e7a2960f56ed0e330c4b.zip |
Pass process_environment_t * to tor_spawn_background
Now tor_spawn_background's prototype is OS-independent.
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/common/util.h b/src/common/util.h index 41bd3d9795..567efaafef 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -365,12 +365,9 @@ void tor_check_port_forwarding(const char *filename, int dir_port, int or_port, time_t now); typedef struct process_handle_t process_handle_t; +typedef struct process_environment_t process_environment_t; int tor_spawn_background(const char *const filename, const char **argv, -#ifdef _WIN32 - LPVOID envp, -#else - const char **envp, -#endif + process_environment_t *env, process_handle_t **process_handle_out); #define SPAWN_ERROR_MESSAGE "ERR: Failed to spawn background process - code " @@ -386,13 +383,9 @@ struct process_environment_t { * NUL-terminated strings of the form "NAME=VALUE". */ char *windows_environment_block; /** A pointer to a NULL-terminated array of pointers to - * NUL-terminated strings of the form "NAME=VALUE". - * - * XXXX This should have type char **, but tor_spawn_background's - * prototype is incorrect. */ - const char **unixoid_environment_block; + * NUL-terminated strings of the form "NAME=VALUE". */ + char **unixoid_environment_block; }; -typedef struct process_environment_t process_environment_t; process_environment_t *process_environment_make(struct smartlist_t *env_vars); void process_environment_free(process_environment_t *env); |