From: Henrique Date: Thu, 23 Apr 2020 14:37:40 +0000 (+0200) Subject: BEE Backport bacula/src/lib/worker.c X-Git-Tag: Release-11.3.2~1778 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a1aaa159f4c0c0da3cc0c242c31f13ef489098a;p=thirdparty%2Fbacula.git BEE Backport bacula/src/lib/worker.c This commit is the result of the squash of the following main commits: Author: Henrique Faria Date: Wed Jul 25 09:39:01 2018 -0300 android: Removed usages of pthread_cancel(), which is not available on Android --- diff --git a/bacula/src/lib/worker.c b/bacula/src/lib/worker.c index 3586689efd..abf610456f 100644 --- a/bacula/src/lib/worker.c +++ b/bacula/src/lib/worker.c @@ -228,7 +228,7 @@ int worker::stop() pthread_cond_signal(&empty_wait); if (!pthread_equal(worker_id, pthread_self())) { - pthread_cancel(worker_id); + pthread_kill(worker_id, SIGUSR2); pthread_join(worker_id, NULL); } return 0;