diff options
author | andmarti1424 <andmarti@gmail.com> | 2017-05-10 19:54:31 -0300 |
---|---|---|
committer | andmarti1424 <andmarti@gmail.com> | 2017-05-10 19:54:31 -0300 |
commit | 2ae2743743e0e9f925f6515b169812ffcf3631dc (patch) | |
tree | dd8700c24a1f09123139df0ea1a08cbb23e9adef /src/main.c | |
parent | 0d869b3074bffba76fcc99eb4827f2ae449725f3 (diff) |
autobackup: control fthread before joining
Diffstat (limited to 'src/main.c')
-rwxr-xr-x | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -93,8 +93,8 @@ 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; +pthread_t fthread = 0; +//pthread_t fthread; #endif #endif @@ -379,7 +379,7 @@ int exit_app(int status) { // wait for autobackup thread to finish, just in case #if defined(AUTOBACKUP) && defined(HAVE_PTHREAD) - if (pthread_exists) pthread_join (fthread, NULL); + if (pthread_exists && fthread) pthread_join (fthread, NULL); #endif // remove backup file |