File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -667,7 +667,9 @@ int flb_start(flb_ctx_t *ctx)
667667 fd = event -> fd ;
668668 bytes = flb_pipe_r (fd , & val , sizeof (uint64_t ));
669669 if (bytes <= 0 ) {
670+ #if defined(FLB_SYSTEM_MACOS )
670671 pthread_cancel (tid );
672+ #endif
671673 pthread_join (tid , NULL );
672674 ctx -> status = FLB_LIB_ERROR ;
673675 return -1 ;
@@ -680,7 +682,9 @@ int flb_start(flb_ctx_t *ctx)
680682 }
681683 else if (val == FLB_ENGINE_FAILED ) {
682684 flb_error ("[lib] backend failed" );
685+ #if defined(FLB_SYSTEM_MACOS )
683686 pthread_cancel (tid );
687+ #endif
684688 pthread_join (tid , NULL );
685689 ctx -> status = FLB_LIB_ERROR ;
686690 return -1 ;
@@ -712,7 +716,9 @@ int flb_stop(flb_ctx_t *ctx)
712716 * the service exited for some reason (plugin action). Always
713717 * wait and double check that the child thread is not running.
714718 */
719+ #if defined(FLB_SYSTEM_MACOS )
715720 pthread_cancel (tid );
721+ #endif
716722 pthread_join (tid , NULL );
717723 return 0 ;
718724 }
@@ -728,7 +734,9 @@ int flb_stop(flb_ctx_t *ctx)
728734 flb_debug ("[lib] sending STOP signal to the engine" );
729735
730736 flb_engine_exit (ctx -> config );
737+ #if defined(FLB_SYSTEM_MACOS )
731738 pthread_cancel (tid );
739+ #endif
732740 ret = pthread_join (tid , NULL );
733741 if (ret != 0 ) {
734742 flb_errno ();
You can’t perform that action at this time.
0 commit comments