Fredrik Fornwall
6 years ago
6 changed files with 46 additions and 23 deletions
@ -1,8 +1,21 @@ |
|||
--- ../../cache/calcurse-4.1.0/src/io.c 2016-03-27 12:26:18.000000000 +0200
|
|||
+++ ./src/io.c 2016-05-09 00:00:16.402558225 +0200
|
|||
@@ -1430,4 +1430,3 @@ void io_stop_psave_thread(void)
|
|||
io_save_mutex_lock(); |
|||
diff -u -r ../calcurse-4.4.0/src/io.c ./src/io.c
|
|||
--- ../calcurse-4.4.0/src/io.c 2019-02-04 20:44:04.000000000 +0000
|
|||
+++ ./src/io.c 2019-03-01 20:49:16.393057747 +0000
|
|||
@@ -1399,7 +1399,6 @@
|
|||
EXIT_IF(delay < 0, _("Invalid delay")); |
|||
char *mesg = _("Periodic save: data files have changed. Save cancelled."); |
|||
|
|||
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|||
for (;;) { |
|||
sleep(delay * MININSEC); |
|||
pthread_mutex_lock(&io_periodic_save_mutex); |
|||
@@ -1424,8 +1423,7 @@
|
|||
|
|||
/* Lock the mutex to avoid cancelling the thread during saving. */ |
|||
pthread_mutex_lock(&io_periodic_save_mutex); |
|||
- pthread_cancel(io_t_psave);
|
|||
- pthread_join(io_t_psave, NULL);
|
|||
+ pthread_kill(io_t_psave, 0);
|
|||
io_save_mutex_unlock(); |
|||
pthread_mutex_unlock(&io_periodic_save_mutex); |
|||
io_t_psave = pthread_self(); |
|||
} |
|||
|
@ -1,8 +0,0 @@ |
|||
--- ../../cache/calcurse-4.1.0/src/notify.c 2016-03-27 12:26:18.000000000 +0200
|
|||
+++ ./src/notify.c 2016-05-09 00:01:31.495324279 +0200
|
|||
@@ -193,4 +193,3 @@ void notify_stop_main_thread(void)
|
|||
if (notify_t_main) { |
|||
- pthread_cancel(notify_t_main);
|
|||
- pthread_join(notify_t_main, NULL);
|
|||
+ pthread_kill(notify_t_main, 0);
|
|||
} |
@ -0,0 +1,13 @@ |
|||
diff -u -r ../calcurse-4.4.0/src/notify.c ./src/notify.c
|
|||
--- ../calcurse-4.4.0/src/notify.c 2019-01-18 22:38:58.000000000 +0000
|
|||
+++ ./src/notify.c 2019-03-01 20:45:55.019585998 +0000
|
|||
@@ -196,8 +196,7 @@
|
|||
if (pthread_equal(notify_t_main, pthread_self())) |
|||
return; |
|||
|
|||
- pthread_cancel(notify_t_main);
|
|||
- pthread_join(notify_t_main, NULL);
|
|||
+ pthread_kill(notify_t_main, 0);
|
|||
notify_t_main = pthread_self(); |
|||
} |
|||
|
@ -0,0 +1,13 @@ |
|||
diff -u -r ../calcurse-4.4.0/src/ui-calendar.c ./src/ui-calendar.c
|
|||
--- ../calcurse-4.4.0/src/ui-calendar.c 2019-01-18 22:38:58.000000000 +0000
|
|||
+++ ./src/ui-calendar.c 2019-03-01 20:47:58.622033795 +0000
|
|||
@@ -123,8 +123,7 @@
|
|||
if (pthread_equal(ui_calendar_t_date, pthread_self())) |
|||
return; |
|||
|
|||
- pthread_cancel(ui_calendar_t_date);
|
|||
- pthread_join(ui_calendar_t_date, NULL);
|
|||
+ pthread_kill(ui_calendar_t_date, 0);
|
|||
ui_calendar_t_date = pthread_self(); |
|||
} |
|||
|
@ -1,8 +0,0 @@ |
|||
--- ../../cache/calcurse-4.1.0/src/ui-calendar.c 2016-03-27 12:26:18.000000000 +0200
|
|||
+++ ./src/ui-calendar.c 2016-05-09 00:01:52.327536161 +0200
|
|||
@@ -145,4 +145,3 @@ void ui_calendar_stop_date_thread(void)
|
|||
if (ui_calendar_t_date) { |
|||
- pthread_cancel(ui_calendar_t_date);
|
|||
- pthread_join(ui_calendar_t_date, NULL);
|
|||
+ pthread_kill(ui_calendar_t_date, 0);
|
|||
} |
Loading…
Reference in new issue