36#ifdef HAVE_SYS_SOCKET_H
37#include <sys/socket.h>
43#define __attribute__(x)
47 __attribute__((noreturn));
52 return "libtorrunner " VERSION;
67 stopped_pid = waitpid(pid, &status, 0);
68 }
while (stopped_pid == -1);
73 if (stopped_pid != pid) {
76 if (WIFSTOPPED(status)) {
77 return WEXITSTATUS(status);
79 if (WIFSIGNALED(status)) {
80 return -WTERMSIG(status);
88#define real_calloc calloc
96 char **args = real_calloc(cfg->
argc + cfg->
argc_owned+1,
sizeof(
char *));
97 memcpy(args, cfg->
argv, cfg->
argc *
sizeof(
char *));
104 int rv = execv(BINDIR
"/tor", args);
Public C API for the Tor network service.
Internal declarations for in-process Tor API.
const char * tor_api_get_provider_version(void)
int tor_run_main(const tor_main_configuration_t *cfg)