.
D 2010-09-04T05:18:51
J assignee andreas_kupries
J cmimetype text/plain
J comment After\swriting\sconsecutive\snewlines\son\sa\sline\sbuffered\snon-blocking\schannel\spipe\sto\sa\schild\sprocess,\sthe\sparent\stclsh\sprocess\sseems\sto\sstop\sflushing\sfurther\swrites\sunless\sevent\sloop\sis\srun.\s\n\nWindows\sXP,\sboth\s8.6\sCVS\shead\sand\s8.5.8\nSee\ssample\ssession:\n\n%\sset\sfd\s[open\s{|\s./tclsh85.exe}\sr+]\nfile9cfd08\n%\sfconfigure\s$fd\s-buffering\sline\s-blocking\s0\n%\sputs\s$fd\s{puts\sfoo}\s\s\s;#\sAsk\schild\sprocess\sto\secho\sfoo\n%\sgets\s$fd\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;\s#\sRead\sback\sresponse\nfoo\n%\sputs\s$fd\s{puts\sfoo}\s\s;\s#\sOnce\smore\sjust\sto\sverify\n%\sgets\s$fd\nfoo\n%\sputs\s$fd\s{\n}\n%\sgets\s$fd\s\s\s;\s#\sFine,\snon-blocking,\sempty\sstring\sreturned\sas\schild\swas\snot\sasked\sto\ssend\sback\sa\sresponse\n%\sputs\s$fd\s{puts\sfoo}\s\s;\s#\sNow\sretry\sprevious\scommand\n%\sgets\s$fd\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;\s#\sUnlike\sbefore,\sno\sresponse,\sexpected\s"foo"\sas\sbefore\n%\sflush\s$fd\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;\s#\sSHould\snot\sbe\snecessary,\sbut\sjust\sin\scase\n%\sgets\s$fd\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;\s#\sflush\sno\suse\n%\supdate\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;\s#\sRun\sevent\sloop\n%\sgets\s$fd\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s;\sAh\snow\schannel\sgets\sflushed,\sand\schild\sreturns\sresponse\nfoo\n\nNot\sclear\sif\sabove\sis\sa\sbug,\sor\smy\sunderstanding\s(that\snon-blocking\sI/O\sdoes\snot\sneed\sthe\sevent\sloop\sif\sfilevents\sare\snot\sbeing\sused)\sis\sincorrect.\sI\sdon't\ssee\swhy\sthe\sbehaviour\sin\sechoing\s"foo"\schanges\safter\swriting\sthe\sempty\sline\nTracing\sindicates\sthe\sfollowing:\n-\sthe\sdata\sis\snot\sbeing\sflushed\sfrom\sthe\sparent\sprocess\soutput\sbuffer\n-\sexiting\sthe\sparent\sbefore\sthe\supdate\sresults\sin\sall\spending\sdata\sbeing\sflushed\s(as\sexpected).\sThe\schild\sthen\ssees\sthat\sdata\s(not\sshown\sabove,\sbut\sverified\sthrough\slogging)\n-\sRemoving\sthe\s-buffering\sline\sgets\srid\sof\sthe\sissue,\sat\sleast\sfor\sthis\sparticular\ssequence\n-\sif\sinstead\sof\swriting\sputs\s{\n}\syou\swrite\sputs\s""\son\sconsecutive\scommand\slines,\sthe\sproblem\sdoes\snot\sshow.\n\n/Ashok\n
J foundin obsolete:\s8.6b1.1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter apnadkarni
J subsystem 25.\sChannel\sSystem
J title On\sWindows\snon-blocking\spipe\sdoes\snot\sflush
J type Bug
K 3059220fffffffffffffffffffffffffffffffff
U apnadkarni
Z 4019e8f3eae21d8507e36e56407a9ae9