<i>WinSock cores/hangs on thread or app exit</i> status still Open with 4 other changes
by
.
D 2007-09-26T21:54:21
J icomment Logged\sIn:\sNO\s\n\nI\sbelieve\sthere\sis\sa\sdefect\son\ssocket\sshutdown\s(Windows)\n\nIn\sTclpFinalizeSockets()\sa\sSOCKET_TERMINATE\smessage\sis\sposted\sto\sthe\ssocket's\swindow,\sfollowed\sby\sa\swait\sfor\sreadyEvent\sto\sbe\ssignaled\s(which\sthe\swndProc\ssignals\swhen\sits\sevent\sloop\sexits,\safter\sreceiving\sits\sdestroy\smessage\swhich\sis\striggered\sby\sthe\sSOCKET_TERMINATE\smessage).\s\s\n\nSince\sreadyEvent\sis\salso\ssignaled\swhen\sdata\sarrives\son\sthe\ssocket,\sthe\swait\sin\sTclpFinalizeSockets\scan\sreturn\sbefore\sthe\ssocket\swindow\shas\sbeen\sdestroyed\sif\sthere\sis\sactivity\son\sthe\ssocket\sat\sthat\stime.\n\nThis\scan\scause\sa\snumber\sof\sdeleterious\sside\seffects,\ssuch\sas\sthe\scall\sto\sUnregisterClass()\sfailing\s(due\sto\sa\swindow\sstill\sexisting)\s-\sand\sthen\sa\sfailure\sto\sinitialize\ssockets\sdue\sto\sRegisterClassA\sfailing\sas\sthe\swindow\sclass\salready\sexists\s-\sin\sa\sscenario\swhere\sTcl\sis\sunloaded\sand\sre-loaded\sfrom\swithin\sthe\ssame\sprocess\sinstance.\n\nThis\sissue\swas\sresolved\sby\susing\sa\sseparate\sevent\sobject\ssolely\sfor\stracking\sthe\ssocket\swindow\screation\sand\sdestruction.\n\nA\srelated\sissue\sin\sInitSockets\sis\sthat\ssockets\sare\smarked\sas\sinitialized\seven\sif\sone\sof\sthe\sinitialization\ssteps\sfails\s(e.g.\sRegisterClassA\sfails).\s\sSubsequent\scalls\sto\sInitSockets\sdo\snot\sexecute\sthe\scode\sto\ssetup\sthe\sWinsock\sDLL,\sbut\sdo\sexecute\sper-thread\sinitialization\sinstructions.\n\n\n
J login [email protected]
J mimetype text/plain
J username [email protected]
K 1437595fffffffffffffffffffffffffffffffff
U nobody
Z 73b9d326d8d4672ac3c2a818a83ce58c