Package: espeakup / 1:0.80-16

mutex Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
commit e69d61b2d88d8dc679558dea03c48130127102ac
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sat Jun 30 15:45:24 2018 +0200

    signal: Add missing mutex_lock/unlock around the while loop
    
    This fixes #12.

diff --git a/signal.c b/signal.c
index 102c3cf..3096b30 100644
--- a/signal.c
+++ b/signal.c
@@ -63,7 +63,9 @@ void *signal_thread(void *arg)
 			printf("espeakup caught signal %d\n", sig);
 			break;
 		}
+		pthread_mutex_lock(&queue_guard);
 	}
+	pthread_mutex_unlock(&queue_guard);
 	/* Tell the reader to stop, if it is in a select() call. */
 	write(PIPE_WRITE_FD, STOP_MSG, strlen(STOP_MSG));
 	return NULL;