Add a unit test for tor_spawn_background

- Test sucessfully starting a process
- Test failing to find the executable
This commit is contained in:
Steven Murdoch
2010-10-10 19:08:44 +01:00
parent 68e576e9f9
commit 8a12ce2cf9
6 changed files with 96 additions and 2 deletions
+1 -1
View File
@@ -2973,7 +2973,7 @@ format_helper_exit_status(unsigned char child_state, int saved_errno,
* -1. Some parts of this code are based on the POSIX subprocess module from
* Python.
*/
static int
int
tor_spawn_background(const char *const filename, int *stdout_read,
int *stderr_read, const char **argv)
{
+2
View File
@@ -350,6 +350,8 @@ HANDLE load_windows_system_library(const TCHAR *library_name);
#ifdef UTIL_PRIVATE
/* Prototypes for private functions only used by util.c (and unit tests) */
int tor_spawn_background(const char *const filename, int *stdout_read,
int *stderr_read, const char **argv);
void format_helper_exit_status(unsigned char child_state,
int saved_errno, char *hex_errno);