]> arthur.barton.de Git - netdata.git/blobdiff - src/plugin_tc.c
added pthread_exit in hope it will solve the crash at exit
[netdata.git] / src / plugin_tc.c
index 15b8077c40af2105acf0c621b7fbba72bdae09c7..5ed9140505c8fa4031f28db8133b1e7bb9ef7dc2 100755 (executable)
@@ -521,6 +521,7 @@ void *tc_main(void *ptr)
                fp = mypopen(buffer, &tc_child_pid);
                if(!fp) {
                        error("TC: Cannot popen(\"%s\", \"r\").", buffer);
+                       pthread_exit(NULL);
                        return NULL;
                }
 
@@ -672,12 +673,14 @@ void *tc_main(void *ptr)
 
                if(netdata_exit) {
                        tc_device_free_all();
+                       pthread_exit(NULL);
                        return NULL;
                }
 
                sleep((unsigned int) rrd_update_every);
        }
 
+       pthread_exit(NULL);
        return NULL;
 }