diff options
author | andmarti1424 <andmarti@gmail.com> | 2017-05-11 20:37:37 -0300 |
---|---|---|
committer | andmarti1424 <andmarti@gmail.com> | 2017-05-11 20:37:37 -0300 |
commit | 7db4b5124f271d7a0b122c101476c7bcdac94934 (patch) | |
tree | f38dcc6fa8aa27b0574e6f580cdafa48591fb6d2 /src/main.c | |
parent | 12c547495ba9eef6976c20be72ba81f238b30adb (diff) |
Change in how pthread_create and pthread_join in controlled
Diffstat (limited to 'src/main.c')
-rwxr-xr-x | src/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -92,9 +92,8 @@ struct timeval startup_tv, current_tv; //runtime timer struct timeval lastbackup_tv; // last backup timer #ifdef HAVE_PTHREAD #include <pthread.h> -int pthread_exists; // return status of pthread_create -pthread_t fthread = 0; -//pthread_t fthread; +int pthread_exists = 0; // return status of pthread_create +pthread_t fthread; #endif #endif @@ -379,7 +378,7 @@ int exit_app(int status) { // wait for autobackup thread to finish, just in case #if defined(AUTOBACKUP) && defined(HAVE_PTHREAD) - if (fthread) pthread_join (fthread, NULL); + if (pthread_exists) pthread_join (fthread, NULL); #endif // remove backup file |