From b1094fdec505088a39c94da79219d17c10baabef Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 3 Jun 2015 03:39:34 +1000 Subject: [PATCH] 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(-) create mode 100644 changes/bug16115-spawn-comment diff --git a/changes/bug16115-spawn-comment b/changes/bug16115-spawn-comment new file mode 100644 index 0000000000..7792564688 --- /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 fdc504690b..487f7e5851 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 data is used, it should not be allocated on the stack,