aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-06-20 10:20:10 -0400
committerNick Mathewson <nickm@torproject.org>2014-06-20 10:20:10 -0400
commit58f4200789d0cc47ebd88f3091207cf4dd493573 (patch)
tree701c9af5a50468abeae0ae65bb32dad4acf54c83 /src/or
parent5b4ee475aa00bb30675e819a0096209e5e427668 (diff)
downloadtor-58f4200789d0cc47ebd88f3091207cf4dd493573.tar
tor-58f4200789d0cc47ebd88f3091207cf4dd493573.tar.gz
Thread support is now required
Long ago we supported systems where there was no support for threads, or where the threading library was broken. We shouldn't have do that any more: on every OS that matters, threads exist, and the OS supports running threads across multiple CPUs. This resolves tickets 9495 and 12439. It's a prerequisite to making our workqueue code work better, since sensible workqueue implementations don't split across multiple processes.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/cpuworker.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 61b2c29b3..62af8e2f5 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -414,12 +414,6 @@ cpuworker_main(void *data)
cpuworker_reply_t rpl;
fd = fdarray[1]; /* this side is ours */
-#ifndef TOR_IS_MULTITHREADED
- tor_close_socket(fdarray[0]); /* this is the side of the socketpair the
- * parent uses */
- tor_free_all(1); /* so the child doesn't hold the parent's fd's open */
- handle_signals(0); /* ignore interrupts from the keyboard, etc */
-#endif
tor_free(data);
setup_server_onion_keys(&onion_keys);
@@ -535,10 +529,6 @@ spawn_cpuworker(void)
return -1;
}
log_debug(LD_OR,"just spawned a cpu worker.");
-#ifndef TOR_IS_MULTITHREADED
- tor_close_socket(fdarray[1]); /* don't need the worker's side of the pipe */
- tor_free(fdarray);
-#endif
conn = connection_new(CONN_TYPE_CPUWORKER, AF_UNIX);