Richard Stallman <[EMAIL PROTECTED]> writes: > I don't know what the general fix is. It makes sense for CVS to leave > file descriptor 2 untouched when executing the CVS_RSH program, so > that any errors from that program will appear on stderr. > > Can CVS be made to cope with EAGAIN on stdout? > That would fix the problem, right? Even if did something stupid > like sleep for a second and try again, that would still fix the bug.
CVS uses stdio, and stdio doesn't work very well with non-blocking file descriptors. CVS can detect the error easily enough, but at that point stdio has already thrown away the buffer full of data, and CVS hasn't recorded it anywhere. While in principle CVS could switch to not use stdio, that would be a fairly substantial change. Perhaps the emacs CVS mode can avoid the problem by not dup-ing descriptor 1 to descriptor 2. That won't help other users, though. I suppose that before CVS does a write to stdout or stderr due to data read from the child process, it could check the blocking status of the file descriptor, and temporarily block it if necessary. It would be tedious to check every time, but it would probably be safe to assume that if the descriptor were ever blocking, it would remain blocking thereafter. Ian _______________________________________________ Bug-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-cvs