X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=36f2d4da19021eae2a63d9684058422881a9d888;hb=849f5394cce97a76da080f6cd9e5194b7f4ee0f0;hp=db093aad8d3a10da1d9a7206433aaa3ac29b2454;hpb=fc2993befd2d9d6d9392cf109f033d0d6f421436;p=collectd.git diff --git a/src/exec.c b/src/exec.c index db093aad..36f2d4da 100644 --- a/src/exec.c +++ b/src/exec.c @@ -788,7 +788,11 @@ static int exec_read(void) /* {{{ */ pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - plugin_thread_create(&t, &attr, exec_read_one, (void *)pl, "exec read"); + int status = + plugin_thread_create(&t, &attr, exec_read_one, (void *)pl, "exec read"); + if (status != 0) { + ERROR("exec plugin: plugin_thread_create failed."); + } pthread_attr_destroy(&attr); } /* for (pl) */ @@ -827,8 +831,11 @@ static int exec_notification(const notification_t *n, /* {{{ */ pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - plugin_thread_create(&t, &attr, exec_notification_one, (void *)pln, - "exec notify"); + int status = plugin_thread_create(&t, &attr, exec_notification_one, + (void *)pln, "exec notify"); + if (status != 0) { + ERROR("exec plugin: plugin_thread_create failed."); + } pthread_attr_destroy(&attr); } /* for (pl) */