[or-cvs] don"t close all the fd"s when you spawn a thread, only when...

Roger Dingledine arma at seul.org
Fri Mar 12 21:52:17 UTC 2004


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(;;) {
 



More information about the tor-commits mailing list