Skip to content
Tcl Source Code Artifact [b0a581527e]
Login

Artifact [b0a581527e]

Artifact b0a581527ee65b2870c9e0ccd10c9b5a200690d8:

Ticket change [b0a581527e] - Ticket [1028264fffffffff|1028264fff] <i>socket: failed write prevents read</i> status still Closed with 4 other changes by ferrieux on 2009-04-28 13:52:59.
D 2009-04-28T13:52:59
J icomment Please\snote\sthat\sthis\swas\sthoroughly\scovered\sin\sthe\stracker\scomments\s(ca.\s20090107)\sthough\s;-)\n\nAnyway,\sthe\slate\sexit\shandler\smechanism\sis\shere\sto\sdelay\sthe\swinsock\scleanup\scall\suntil\safter\sall\ssockets\shave\sbeen\sclosed,\swith\sthe\sfinal\sgoal\sof\spreventing\sthe\s*sending*\sof\san\sRST\son\sTcl\sexit.\sNotice\sthat\s"server"\sand\s"client"\sare\sinterchangeable\shere;\sit's\smore\sa\squestion\sof\swho's\ssending\sthe\sRST\sand\swho's\sbarfing\son\sreceiving\sit.\n\nSince\s2446662\sfixes\sthe\sreceive\sside,\sand\swas\scommitted\sbefore\sthis\sone\son\sall\sthree\sbranches,\sit\smeans\sthat\sa\sTcl\speer\sreceiving\sthe\sRST\swill\sno\slonger\sraise\san\serror.\sBut\sit\sstill\swill\sdiscard\squeued\sinput\sdata\safter\sit\sgot\sthe\sRST\s(because\sthat's\sthe\sRST's\ssemantics\sin\sthe\skernel\sstack).\s\n\nHence\s(1)\sI\sexaggerated\swhen\sI\ssaid\sthis\sfix\swas\snot\sunit-testable\s(the\svery\stest\scase\sthat\swas\ssometimes\sfailing\sis\snow\sworking\sreliably\s--\sbut\sbuilding\sa\s100%\sfailing\scase\sis\sa\slot\sof\swork),\sand\s(2)\sI\sthink\sthe\s"late\sWSACleanup"\sis\sthe\sonly\sway\sto\sprevent\ssending\sthose\snasty\sRSTs\son\sexit\s(which\smay\salso\sdisrupt\sa\snon-Tcl\speer).\n\nOf\scourse\sa\scontorted\shack\scould\sinvolve\sdoing\sthis\slate\scleanup\sby\smaking\sthe\swhole\sinterp\steardown\sfunction\scompletely\splatform-specific,\sand\shard-code\sthe\swinsock\scleanup\snear\sthe\send\sin\sthe\swin32\scase.\sBut\sI\sfail\sto\ssee\sthe\sadvantage\sof\ssuch\san\sapproach\sover\sthe\scleaner\sand\sgeneric\snotion\sof\slate\sexit\shandlers,\swhich\sallows\sany\sextension\sto\suse\sthe\ssame\ssemantics\s(and\shas\sbeen\scommitted\sto\sHEAD\sfor\ssome\stime\swith\sno\sill\seffect...).\n\n\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 1028264fffffffffffffffffffffffffffffffff
U ferrieux
Z 0add90d280d66e4d0bba988796febd45