<i>TIP 562 changes broke the trunk</i> status still Open with 3 other changes
by
.
D 2020-03-04T19:54:20.410
J icomment \r\nWhat\sa\smess.\r\n\r\nPart\sof\sTcl_Close\sin\sTcl\s8.6\ssources\slooks\slike\sthis:\r\n\r\n\s\s\s\s/*\r\n\s\s\s\s\s*\sIf\sthis\schannel\ssupports\sit,\sclose\sthe\sread\sside,\ssince\swe\sdon't\sneed\r\n\s\s\s\s\s*\sit\sanymore\sand\sthis\swill\shelp\savoid\sdeadlocks\son\ssome\schannel\stypes.\r\n\s\s\s\s\s*/\r\n\r\n\s\s\s\sif\s(chanPtr->typePtr->closeProc\s==\sTCL_CLOSE2PROC)\s{\r\n\s\s\s\s\s\s\s\sresult\s=\schanPtr->typePtr->close2Proc(chanPtr->instanceData,\sinterp,\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTCL_CLOSE_READ);\r\n\s\s\s\s\s\s\s\sif\s(result\s==\sEINVAL)\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\sresult\s=\s0;\r\n\s\s\s\s\s\s\s\s}\r\n\s\s\s\s}\r\n\r\nBased\son\sthe\scomment,\sthe\svalue\sTCL_CLOSE2PROC\sis\sbeing\sused\sto\ssignal\sthe\sexistence\sof\sa\shalf-close\ssupporting\sclose2Proc\sin\sthe\sTcl_ChannelType.\sThis\r\nis\strue,\sbut\sthis\sis\snot\sthe\sonly\sway\ssuch\sa\sthing\scan\sbe\spresent.\sSurely\sit\r\nis\smore\sreliable\sand\scorrect\sto\sjust\stest\sthe\sclose2Proc\sentry\sitself.\sArguably\r\nthis\shas\salways\sbeen\sa\sbug.\r\n\r\nBut\ssince\sthe\scode\shas\snever\sbeen\swritten\sthat\sway,\sit\shas\salways\sskipped\r\nover\sthe\shalf-close\sattempt\sfor\sany\schannel\sthat\sprovides\sa\sreal\scloseProc,\r\nwhich\sthe\sunix\s"tcp"\schannel\sdoes.\sAt\sa\sminimum,\sour\sown\schannels\sare\sbug\r\ndependent.\r\n\r\nWith\srecent\schanges\sthat\signored\sthe\spossibility\sof\sindependent\scloseProc\r\nand\sclose2Proc\sentries\sin\sthe\schannel\stype,\swe\snow\shave\sa\shalf-close\sgetting\r\ncalled\son\s"tcp"\schannels\sfor\sthe\sfirst\stime\sas\spart\sof\sa\stypical\s[close].\r\n\r\nWhen\sthe\ssocket\sconnection\sisn't\sgood,\sthe\shalf-close\scan\sraise\sENOTCONN.\r\nWhile\sTcl_Close\sfilters\sout\sEINVAL,\sit\slets\sENOTCONN\sthrough,\sso\sfor\sthe\r\nfirst\stime\swith\sthese\schanges\swe\shave\s[close]\sraising\serrors.\sThis\sis\sa\r\nscript\slevel\sincompat.\sUnwelcome.\sSomewhere\swe\sneed\sto\srestore\sthe\sbehavior\r\nthat\sdetection\sof\sa\sbad\sconnection\sduring\sa\s[close]\sdoesn't\scause\s[close]\r\nto\sthrow\san\serror\s(especially\snot\sone\swith\sNO\serror\smessage\sor\scode!)
J login dgp
J mimetype text/plain
K 65c9cd1534b6e722bbc221ba917d0865a66a50e6
U dgp
Z 7b3a139dbe7aa8a9b4ff1f8ffa8e9949