X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fexec.c;h=6be6faec7bcbefa78fb7123686c7498d38fd5167;hb=1159cb5d383c55a80a0db100b8f7aadcf44740a5;hp=a9f7be5c4447ad1efc2664932990f5e74d758a58;hpb=4eca75de34e9c3d7f2391b9c7a5951a27a713804;p=collectd.git diff --git a/src/exec.c b/src/exec.c index a9f7be5c..6be6faec 100644 --- a/src/exec.c +++ b/src/exec.c @@ -799,7 +799,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) */ @@ -838,8 +842,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) */