mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
don't close all the fd's when you spawn a thread, only when you fork
svn:r1267
This commit is contained in:
parent
965a73dc71
commit
1ae45b771e
@ -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(;;) {
|
||||
|
||||
|
@ -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(;;) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user