ALT Linux repositórios
Group :: Arquivamento/Gravação de CD
RPM: xcdroast
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: xcdroast-0.98alpha15-rh-linebuffer.patch
Download
Download
--- xcdroast-0.98alpha15/src/tools.c.linebuffer 2003-10-26 22:28:57.000000000 +0000
+++ xcdroast-0.98alpha15/src/tools.c 2004-07-12 12:24:36.134850404 +0100
@@ -596,8 +596,25 @@
if (rc == -1 && errno == EAGAIN) {
if (n == 1)
return(-1);
- else
+ else {
+ /* Partial line read. Wait a
+ * bit longer in case there's
+ * more. This does not fix
+ * all the races in the
+ * parsing code, but works
+ * around them somewhat. */
+ struct timeval t;
+ fd_set set;
+ FD_ZERO(&set);
+ FD_SET(fd,&set);
+ t.tv_sec = 1;
+ t.tv_usec = 0;
+ if (select (fd+1, &set, NULL,
+ NULL, &t) > 0)
+ continue;
+
break;
+ }
}
return(-1); /* error */
}