<i>Notification when there's no data</i> status still Open with 4 other changes
by
.
D 2001-09-19T05:55:04
J icomment Logged\sIn:\sYES\s\nuser_id=75003\n\nOk,\sit\sreally\slooks\slike\sthe\ssituation\sI\sthought.\sexpect\s\nreads\smore\sthan\sis\sin\sthe\sbuffers,\sgoes\sto\sthe\sOS\sand\sthen\s\ngets\sstuck\sin\sthe\slow-level\sread.\n\nThat\sthe\stimer\sexists\sand\sfires\sis\scorrect,\sthere\sis\sdata\s\nto\sread\s(in\sthe\sbuffers).\sJust\snot\senough\sto\ssatisfy\sexpect.\n\nWhile\slooking\sfurther\sthrough\sthe\sexpect\scode,\sbeginning\s\nwith\sExpInputProc\sI\snoted\san\sinconsistency\sin\sthe\sexpect\s\nchannel\scode.\sSee\sthe\sfollowing\sexcerpts\sfrom\sexp_chan.c:\n\nLine\s53:\nTcl_ChannelType\sexpChannelType\s=\s{\n\s\s\s\s"exp",/*\sType\sname.\s*/\n\s\s\s\s/*\sExpect\schannels\sare\salways\sblocking\s*/\n\s\s\s\sNULL,/*\sSet\s\nblocking/nonblocking\smode.*/\n\nLine\s115\s(ExpInputProc)\n\s\s\s\s/*\n\s\s\s\s\s*\sAssume\sthere\sis\salways\senough\sinput\savailable.\sThis\s\nwill\sblock\n\s\s\s\s\s*\sappropriately,\sand\sread\swill\sunblock\sas\ssoon\sas\sa\s\nshort\sread\sis\n\s\s\s\s\s*\spossible,\sif\sthe\schannel\sis\sin\sblocking\smode.\sIf\sthe\s\nchannel\sis\n\s\s\s\s\s*\snonblocking,\sthe\sread\swill\snever\sblock.\n\s\s\s\s\s*/\n\nLine\s512\s(expCreateChannel):\n\s\s\s\sTcl_SetChannelOption(interp,esPtr->channel,"-\nblocking","0");\n\nIn\sother\swords,\sseveral\sparts\sof\sexpect\sseem\sto\sdisagree\s\nwhether\sthe\schannel\sis\sblocking\sor\snonblocking.\n\nI\sfear\sthat\sthe\slast\scommand\s(line\s512)\sleaves\sthe\sgeneric\s\nI/O\slayer\sin\sthe\stcl\score\sa\sbit\sconfused.\sIt\stries\sto\s\nhandle\sthe\schannel\sas\snon-blocking\sbut\sthe\slow-level\sfile\s\ndescriptor\swas\snever\stold\sso.\sThis\smay\sallow\sthe\sgeneric\s\nI/O\score\sin\ssome\ssituations\sto\stry\sto\sread\sfrom\sthe\schannel\s\nwhen\sit\swould\snot\stry\sthe\ssame\sfor\sa\sblocking\schannel.\n\nPlease\stry\sto\scomment\sout\sline\s512\sin\sexp_chan.c\sand\ssee\sif\s\nthe\sproblem\sis\sstill\sthere\safterward.\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 462317ffffffffffffffffffffffffffffffffff
U andreas_kupries
Z d41d1bf310bdcf8389b3a6feaef62114