[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torsocks/osx] Do our best to ensure tsocks_init is called only once.
commit 8829590838478cd68b7893ec5e67f350fc081cab
Author: Robert Hogan <robert@xxxxxxxxxx>
Date: Sun Jun 20 13:11:53 2010 +0100
Do our best to ensure tsocks_init is called only once.
---
src/tsocks.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/tsocks.c b/src/tsocks.c
index d76808c..dbda0f9 100644
--- a/src/tsocks.c
+++ b/src/tsocks.c
@@ -176,6 +176,10 @@ void tsocks_init(void) {
return;
}
+ /* Not strictly true yet, but prevents us getting called while still in progress.*/
+ /* This has been observed on Snow Leopard for instance. */
+ tsocks_init_complete = 1;
+
#ifdef USE_OLD_DLSYM
void *lib;
#endif
@@ -260,7 +264,6 @@ void tsocks_init(void) {
area won't be shared across fork()s. */
deadpool_init();
#endif
- tsocks_init_complete=1;
}
static int get_environment() {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits