X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=b145e81320b387b4d98c9f6938f197295815468a;hb=07ba05937aeaedd683656c3912040950dbf4a152;hp=db093aad8d3a10da1d9a7206433aaa3ac29b2454;hpb=072244d2e10336241610a1a0448a8149e9c77e7e;p=collectd.git diff --git a/src/exec.c b/src/exec.c index db093aad..b145e813 100644 --- a/src/exec.c +++ b/src/exec.c @@ -80,7 +80,7 @@ typedef struct program_list_and_notification_s { /* * Private variables */ -static program_list_t *pl_head = NULL; +static program_list_t *pl_head; static pthread_mutex_t pl_lock = PTHREAD_MUTEX_INITIALIZER; /* @@ -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) */