[tor-commits] [tor/master] Fix an incorrect comment on spawn_func

nickm at torproject.org nickm at torproject.org
Tue Jun 2 19:07:40 UTC 2015


commit b1094fdec505088a39c94da79219d17c10baabef
Author: teor <teor2345 at gmail.com>
Date:   Wed Jun 3 03:39:34 2015 +1000

    Fix an incorrect comment on spawn_func
    
    spawn_func calls pthread_create on unix, not fork
    
    Fix on existing code split out of compat.c into
    compat_pthreads.c in c2f0d52b7fb9
---
 changes/bug16115-spawn-comment |    6 ++++++
 src/common/compat_pthreads.c   |    3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/changes/bug16115-spawn-comment b/changes/bug16115-spawn-comment
new file mode 100644
index 0000000..7792564
--- /dev/null
+++ b/changes/bug16115-spawn-comment
@@ -0,0 +1,6 @@
+  o Minor fixes (threads, comments):
+    - Fix an incorrect comment on spawn_func in compat_pthreads.c.
+      spawn_func calls pthread_create on unix, not fork
+      Patch by "teor".
+      Bugfix on unknown tor version (existing code split out of
+      compat.c into compat_pthreads.c in c2f0d52b7fb9 on 22 Sep 2013).
diff --git a/src/common/compat_pthreads.c b/src/common/compat_pthreads.c
index fdc5046..487f7e5 100644
--- a/src/common/compat_pthreads.c
+++ b/src/common/compat_pthreads.c
@@ -50,7 +50,8 @@ static pthread_attr_t attr_detached;
 static int threads_initialized = 0;
 
 /** Minimalist interface to run a void function in the background.  On
- * Unix calls fork, on win32 calls beginthread.  Returns -1 on failure.
+ * Unix calls pthread_create, on win32 calls beginthread.  Returns -1 on
+ * failure.
  * func should not return, but rather should call spawn_exit.
  *
  * NOTE: if <b>data</b> is used, it should not be allocated on the stack,





More information about the tor-commits mailing list