Skip to content
Tcl Source Code Artifact [e2e49d6c02]
Login

Artifact [e2e49d6c02]

Artifact e2e49d6c02927cc3a74bb687198f2eb6bf64090d:

Ticket change [e2e49d6c02] - Ticket [1913876fffffffff|1913876fff] <i>Get weird error during [chan seek], using [chan create]</i> status still Open with 4 other changes by andreas_kupries on 2008-03-15 00:19:43.
D 2008-03-15T00:19:43
J icomment Logged\sIn:\sYES\s\nuser_id=75003\nOriginator:\sNO\n\nOk.\sYour\s'write'\scommand\sis\sstill\snot\sreturning\sthe\snumber\sof\sbytes\swritten,\sbut\sincorrectly\san\sempty\sstring.\nThis\scauses\san\serror\sto\sbe\sstashed\sinto\sthe\stip\s219\sareas,\swhen\s'write'\sis\sinvoked.\n\nWhy\sis\sthis\sreturned\sfor\sseek,\sbut\snot\sfor\sputs?\n\nIn\syour\sexample\sthe\s'puts'\sis\snot\sinvoking\sthe\s'write'\sprocedure.\s'write'\sis\sinvoked\swhen\sthe\schannel\sis\sflushed,\sand\syour\s[puts]\sdoesn't\scause\sthat.\sTcl's\sIO\ssystem\sbuffers\sthings\sup,\sdefault\sis\sto\sflush\swhen\sa\sbuffer\sis\sfull,\sor,\son\sinteractive\sstuff,\swhen\sa\sfull\sline\sis\swritten.\n\nHowever,\sfor\s[seek]\sto\swork\sproperly\sit\sthe\sI/O\score\shas\sto\sflush\soutstanding\swrites,\sso\sit\sdoes.\nAt\sthat\spoint\sthe\s'write'\sis\sinvoked,\scauses\sthe\serror,\swhich\sis\sthen\sreturned\sby\s[seek].\nIf\syou\sdon't\sdo\sthe\sseek\sthe\sflush\shappens\son\s[close],\sand\s[close]\sreturns\sthe\serror.\n\nWhat\syou\sare\sseeing\snow\sis\show\sTcl\sI/O\score\scan\sdefer\sstuff\suntil\sit\sis\shas\sto\sbe\sdone.\nIt\sallows\sfor\serrors\sto\sappear\sin\splaces\swhich\sseem\sto\sbe\sodd\sat\sfirst\sglance.\nI.e.\swith\sreflected\schannel\syou\scan\sget\sa\svery\sdeep\speek\sinto\sthe\sinternals\sof\sTcl's\sIO\ssystem.\n\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 1913876fffffffffffffffffffffffffffffffff
U andreas_kupries
Z faccd19de21ec46ed8ce43d1075e7678