+ while (42)
+ {
+ ssize_t rd_status;
+ char buffer[1024*1024];
+
+ rd_status = read (fd, buffer, sizeof (buffer));
+ if (rd_status < 0)
+ {
+ if ((errno == EINTR) || (errno == EAGAIN))
+ continue;
+
+ fprintf (stderr, "gl_read_cache: read(2) failed with status %i\n",
+ errno);
+ close (fd);
+ return (errno);
+ }
+ else if (rd_status == 0)
+ {
+ yajl_parse_complete (handle);
+ break;
+ }
+ else
+ {
+ yajl_parse (handle,
+ (unsigned char *) &buffer[0],
+ (unsigned int) rd_status);
+ }
+ }
+
+ fprintf (stderr, "gl_read_cache: Closing cache file and returning\n");
+ gl_last_update = statbuf.st_mtime;