aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-03-12 21:52:15 +0000
committerRoger Dingledine <arma@torproject.org>2004-03-12 21:52:15 +0000
commit1ae45b771e3603fa33fcd8d50125bf9f50dcc74e (patch)
treeff198579f14f7f851629a5ec4220d655d1d3b539 /src
parent965a73dc7103e686c861466c7d3ab55ab2100d50 (diff)
downloadtor-1ae45b771e3603fa33fcd8d50125bf9f50dcc74e.tar
tor-1ae45b771e3603fa33fcd8d50125bf9f50dcc74e.tar.gz
don't close all the fd's when you spawn a thread, only when you fork
svn:r1267
Diffstat (limited to 'src')
-rw-r--r--src/or/cpuworker.c3
-rw-r--r--src/or/dns.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 9fcf64bb0..ba7a0837a 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -127,8 +127,9 @@ int cpuworker_main(void *data) {
close(fdarray[0]); /* this is the side of the socketpair the parent uses */
fd = fdarray[1]; /* this side is ours */
+#ifndef MS_WINDOWS
connection_free_all(); /* so the child doesn't hold the parent's fd's open */
-/* XXX probably don't close all the fd's on MS_WINDOWS? */
+#endif
for(;;) {
diff --git a/src/or/dns.c b/src/or/dns.c
index 3112de3ac..199958bb0 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -412,8 +412,9 @@ int dnsworker_main(void *data) {
close(fdarray[0]); /* this is the side of the socketpair the parent uses */
fd = fdarray[1]; /* this side is ours */
+#ifndef MS_WINDOWS
connection_free_all(); /* so the child doesn't hold the parent's fd's open */
-/* XXX probably don't close all the fd's on MS_WINDOWS? */
+#endif
for(;;) {