]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix an incorrect comment on spawn_func
authorteor <teor2345@gmail.com>
Tue, 2 Jun 2015 17:39:34 +0000 (03:39 +1000)
committerteor <teor2345@gmail.com>
Tue, 2 Jun 2015 18:18:43 +0000 (04:18 +1000)
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 [new file with mode: 0644]
src/common/compat_pthreads.c

diff --git a/changes/bug16115-spawn-comment b/changes/bug16115-spawn-comment
new file mode 100644 (file)
index 0000000..7792564
--- /dev/null
@@ -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).
index fdc504690b66c1bee2b1adf2568ca561ced1f6d8..487f7e5851ebd0b275988d75141f8c46ad555123 100644 (file)
@@ -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,