diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 4abd78c2ac6e5fe2a2060b265233cdb000dd0b93
parent 0a11fa5f4edf3ec1cc5fe2cc6957bf69cd63695d
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Wed, 24 Nov 2021 21:24:30 +0100

use pthread_detach

Diffstat:
Msrc/caldav.c | 1+
Msrc/import.c | 3++-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/caldav.c b/src/caldav.c @@ -624,6 +624,7 @@ int caldav_sync(struct tm* date, } pthread_create(&progress_tid, NULL, show_progress, (void*)header); + pthread_detach(progress_tid); char* principal_postfields = "<d:propfind xmlns:d='DAV:' xmlns:cs='http://calendarserver.org/ns/'>" "<d:prop><d:current-user-principal/></d:prop>" diff --git a/src/import.c b/src/import.c @@ -78,6 +78,7 @@ void ics_import(const char* ics_input, WINDOW* header, WINDOW* cal, WINDOW* asid if (conf_ch == 'y' || conf_ch == 'Y' || conf_ch == 'a' || conf_ch == '\n') { pthread_create(&progress_tid, NULL, show_progress, (void*)header); + pthread_detach(progress_tid); // persist VEVENT to local file FILE* cursordate_file = fopen(path, "wb"); @@ -109,8 +110,8 @@ void ics_import(const char* ics_input, WINDOW* header, WINDOW* cal, WINDOW* asid wchgat(cal, 2, atrs | A_BOLD, 0, NULL); prefresh(cal, *pad_pos, 0, 1, ASIDE_WIDTH, LINES - 1, ASIDE_WIDTH + CAL_WIDTH); } - pthread_cancel(progress_tid); } + pthread_cancel(progress_tid); } // fprintf(stderr, "Import DTSTART: %s\n", desc);