/* seek at the end -8000 chars */
lseek(logfh, -8000, SEEK_END);
/* if not at the beginning, read until endofline */
logline[logcur % LOGLINES][0] = '\0';
l = read(logfh, logline[logcur % LOGLINES], sizeof(logline[logcur % LOGLINES])-1);
/* seek at the end -8000 chars */
lseek(logfh, -8000, SEEK_END);
/* if not at the beginning, read until endofline */
logline[logcur % LOGLINES][0] = '\0';
l = read(logfh, logline[logcur % LOGLINES], sizeof(logline[logcur % LOGLINES])-1);