]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport bacula/src/lib/worker.c
authorHenrique <henrique.faria@baculasystems.com>
Thu, 23 Apr 2020 14:37:40 +0000 (16:37 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 29 Apr 2021 08:44:17 +0000 (10:44 +0200)
This commit is the result of the squash of the following main commits:

Author: Henrique Faria <hfaria020@gmail.com>
Date:   Wed Jul 25 09:39:01 2018 -0300

    android: Removed usages of pthread_cancel(), which is not available on Android

bacula/src/lib/worker.c

index 3586689efdb0583d868a7b589bb7ec067f2add67..abf610456fe96825a170df2a85a660304af2def8 100644 (file)
@@ -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;