]> arthur.barton.de Git - netdata.git/blobdiff - src/plugin_macos.c
improved netdata cleanup/exit procedure
[netdata.git] / src / plugin_macos.c
index 9f88d1e2e6ca8ada0d44c645b100ee5bcffc7d90..726d5b73b22c879a26b12f4581dfe3dfba43d128 100644 (file)
@@ -1,8 +1,7 @@
 #include "common.h"
 
-void *macos_main(void *ptr)
-{
-    (void)ptr;
+void *macos_main(void *ptr) {
+    struct netdata_static_thread *static_thread = (struct netdata_static_thread *)ptr;
 
     info("MACOS Plugin thread created with task id %d", gettid());
 
@@ -79,6 +78,8 @@ void *macos_main(void *ptr)
 
     info("MACOS thread exiting");
 
+    static_thread->enabled = 0;
+    static_thread->thread = NULL;
     pthread_exit(NULL);
     return NULL;
 }