e$B%o%J%Y$H?=$7$^$9!#e(B
e$B%9%l%C%ICf$GJ8;z?t$,e(B PIPE_BUF e$B$N#2G\0J>e$NJ8;zNs$re(B
IO#flush e$B$7$?>l9g!“J8;zNs$,ES@Z$l$k$3$H$,$”$j$^$9!#e(B
e$B$^$?F1MM$KJ8;z?t$,e(B PIPE_BUF e$B0J>e$NJ8;zNs$G$Oe(B
e$B=PNO$KM>J,$JJ8;zNs$,$D$/$3$H$,$"$j$^$9!#e(B
e$B$-$A$s$HE,59e(B flush e$B$r$7$F$/$l$kC<Kv$G$O:F8=$7$^$;$s!#e(B
e$B6qBNE*$K$O!"0J2<$N$h$&$J%9%/%j%W%H$G5/$3$j$($^$9!#e(B
Thread.new do
print " "*2047 + “foo”
STDOUT.flush
print “.”*1025
STDOUT.flush
end
sleep 0.1
PIPE_BUF == 1024 e$B$N<j85$N4D6-e(B(Mingw + MSYS + rxvt)e$B$G$Oe(B
e$B6uGrNs!“e(Bfooe$B!”%I%C%HNs$H$$$C$?=PNO$rF@$k$O$:$,e(B
e$B6uGrNs!“e(Bfe$B!”%I%C%HNs!"6uGrNs!"e(Bfe$B$H$$$&=PNO$K$J$C$F$7$^$$$^$9!#e(B
e$B:F8=$9$kC<Kv$,>/$J$$$H;W$$!“D9$a$K@bL@$5$;$F$$$?$@$-$^$7$?!#e(B
e$B$/$I$/$J$C$F$7$^$$?=$7Lu$”$j$^$;$s!#%Q%C%A$OC;$$$G$9!#e(B
Index: io.c
— io.c (revision 16278)
+++ io.c (working copy)
@@ -584,8 +584,8 @@
return 0;
}
if (0 <= r) {
-
fptr->wbuf_off = r;
-
fptr->wbuf_len = r;
-
fptr->wbuf_off += r;
-
}fptr->wbuf_len -= r; errno = EAGAIN;
if (rb_io_wait_writable(fptr->fd)) {