[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] don"t close all the fd"s when you spawn a thread, only when...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] don"t close all the fd"s when you spawn a thread, only when...
- From: arma@seul.org (Roger Dingledine)
- Date: Fri, 12 Mar 2004 16:52:17 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 12 Mar 2004 16:52:43 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
dns.c cpuworker.c
Log Message:
don't close all the fd's when you spawn a thread, only when you fork
Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- dns.c 12 Mar 2004 18:45:42 -0000 1.66
+++ dns.c 12 Mar 2004 21:52:15 -0000 1.67
@@ -412,8 +412,9 @@
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(;;) {
Index: cpuworker.c
===================================================================
RCS file: /home/or/cvsroot/src/or/cpuworker.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- cpuworker.c 11 Mar 2004 06:35:03 -0000 1.26
+++ cpuworker.c 12 Mar 2004 21:52:15 -0000 1.27
@@ -127,8 +127,9 @@
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(;;) {