2010-10-10 18:12:23 +01:00
|
|
|
#include <stdio.h>
|
2011-07-22 15:57:56 +01:00
|
|
|
#include "orconfig.h"
|
|
|
|
#ifdef MS_WINDOWS
|
|
|
|
#define WINDOWS_LEAN_AND_MEAN
|
|
|
|
#include <windows.h>
|
|
|
|
#else
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
2010-10-10 18:12:23 +01:00
|
|
|
|
|
|
|
/** Trivial test program which prints out its command line arguments so we can
|
|
|
|
* check if tor_spawn_background() works */
|
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
fprintf(stdout, "OUT\n");
|
|
|
|
fprintf(stderr, "ERR\n");
|
2010-10-11 23:22:52 +01:00
|
|
|
for (i = 1; i < argc; i++)
|
2010-10-10 18:12:23 +01:00
|
|
|
fprintf(stdout, "%s\n", argv[i]);
|
2011-07-22 15:57:56 +01:00
|
|
|
fprintf(stdout, "SLEEPING\n");
|
|
|
|
#ifdef MS_WINDOWS
|
|
|
|
Sleep(1000);
|
|
|
|
#else
|
|
|
|
sleep(1);
|
|
|
|
#endif
|
2010-10-10 18:12:23 +01:00
|
|
|
fprintf(stdout, "DONE\n");
|
2011-07-22 15:57:56 +01:00
|
|
|
#ifdef MS_WINDOWS
|
|
|
|
Sleep(1000);
|
|
|
|
#else
|
|
|
|
sleep(1);
|
|
|
|
#endif
|
2010-10-10 18:12:23 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|