Skip to content

Commit b891015

Browse files
cosmo0920edsiper
authored andcommitted
input_thread: macos: Add a missing pthread_cond_init
On macOS, don't wait on a condition that is not initialized yet. We must initialize it at first. ref: lemmy/BlockingQueue#3 Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 780b36c commit b891015

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/flb_input_thread.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ static struct flb_input_thread_instance *input_thread_instance_create(struct flb
218218
thi->init_status = 0;
219219
pthread_mutex_init(&thi->init_mutex, NULL);
220220

221+
/* init condition */
222+
pthread_cond_init(&thi->init_condition, NULL);
223+
221224
/* initialize lists */
222225
mk_list_init(&thi->input_coro_list);
223226
mk_list_init(&thi->input_coro_list_destroy);

0 commit comments

Comments
 (0)