if((logfile.fd=open(logfile.name.c_str(),O_RDONLY))==-1) { printf("Error Opening File.. %s\n",logfile.name.c_str());exit(0); } fstat(logfile.fd,&stats); logfile.ino=stats.st_ino; oldflags=fcntl(logfile.fd,F_GETFL,0); if(oldflags<0) printf("Something Failed Trying to read fcntl\n"); if(fcntl(logfile.fd,F_SETFL,oldflags & ~O_NONBLOCK)==-1) { printf("Something Broke Setting Block Mode\n"); exit(0); } //goto end of file. lseek(logfile.fd,0,SEEK_END);