<i>Tcl 8.4.5 with Expect 5.39 hangs waiting for data matching p</i> status still Open with 4 other changes
by
.
D 2004-05-05T06:28:57
J icomment Logged\sIn:\sYES\s\nuser_id=75003\n\nI\sam\strying\sto\sunderstand\sthis\sand\shave\ssome\squestions.\sYou\nsaid\sthat\sGetInput\sis\sblocking\sin\sthe\sread\s...\sLine\s5303\s...\nOk,\sjust\sbefore\sthat\sthe\sgeneric\sIO\ssystem\slooks\sif\sthe\nchannel\sis\snon-blocking\sor\snot.\sIt\stries\sto\sread\sonly\sif\sthe\nchannel\sis\sin\sblocking\smode.\sSo\syour\sexpect\schannel\sis\sin\nblocking\smode,\sright\s?\sOn\sthe\sother\shand,\swhen\sexpect\ncreates\sa\schannel\sit\ssets\sthis\schanel\sto\s-blocking\s0,\si.e.\nnon-blocking\s(exp_chan.c,\sline\s520,\sfunction\sexpCreateChannel).\n\nSo,\sdoes\syour\sapplication\s(or\sa\spackage\sit\suses)\sswitch\sthe\nexpect\schannel\sinto\sblocking\smode\s?\sIf\syes,\scan\syou\sdisable\nthat\spart\sand\scheck\sif\syour\sapplication\swill\sstill\swork\ncorrectly\s?\n\nFrom\sthe\sTcl\score's\sperspective\sthe\sbehaviour\sis\scorrect:\n\n-\sOn\sthe\snext\sto\slast\sround\sExpect\ssees\sthat\sit\shas\snot\smuch\nroom\sin\sexpect_out\sand\sask\sfor\sless\sdata\sthan\sTcl\shas\sin\sits\nbuffers,\sand\sTcl\sreturns\sthat.\n-\sOn\sthe\snext\sround\sExpect\sasks\sfor\smuch\smore\sdata\sthan\sTcl\nhas\sin\sthe\sbuffers,\sand\sso\sTcl\sgoes\slooking\sfor\smore,\sand\sas\nthe\schannel\sis\sblocking\sit\salso\sknows\sthat\sit\sshould\swait\nfor\sthe\sOS\sto\sdeliver\sthe\sdata.\sIf\sthe\schannel\shad\sbeen\nnon-blocking\sTcl\swould\snot\sonly\ssee\sthat\sthe\sOS\sis\scurrently\nout\sof\sdata\sbut\swould\salso\sabort\sthe\soperation\sand\ssimply\nreturn\swhat\sdata\sit\shas,\sinstead\sof\strying\sto\sforcibly\nfulfill\sthe\srequest\scompletely.\n\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 943274ffffffffffffffffffffffffffffffffff
U andreas_kupries
Z 40cf1b3b5ce507217ee61c54f9f423fa