X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=6be6faec7bcbefa78fb7123686c7498d38fd5167;hb=0d9f395599348e735e6f461e1c328293bef0d060;hp=a9f7be5c4447ad1efc2664932990f5e74d758a58;hpb=a1b19a64325554b0410daaefed3ce229b34958b7;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) */