+ errno = 0;
+ clearerr(fp);
+
+ if(unlikely(fileno(fp) == -1)) {
+ error("PLUGINSD: %s: file is not a valid stream.", cd->fullfilename);
+ goto cleanup;
+ }
+
+ while(!ferror(fp)) {
+ if(unlikely(netdata_exit)) break;
+
+ char *r = fgets(line, PLUGINSD_LINE_MAX, fp);
+ if(unlikely(!r)) {
+ error("PLUGINSD: %s : read failed.", cd->fullfilename);
+ break;
+ }
+