<i>close returns empty error message if failed non-blocking write flush pending</i> status still Open with 4 other changes
by
.
D 2014-04-01T07:45:19.398
J icomment I\stried\stoday\sto\spopulate\sthe\sunreportedMsg\sfield\sby\sthe\sfollowing\spatch.\r\n<verbatim>\r\n---\sC:/test/tcl-bug-97069ea11a_no_error_message/generic/tclIO_ori.c\tTue\sApr\s01\s08:29:28\s2014\r\n+++\sC:/test/tcl-bug-97069ea11a_no_error_message/generic/tclIO.c\tTue\sApr\s01\s09:03:48\s2014\r\n@@\s-2531,10\s+2531,15\s@@\r\n\s\r\n\s\t\tif\s(statePtr->unreportedError\s==\s0)\s{\r\n\s\t\t\s\s\s\sstatePtr->unreportedError\s=\serrorCode;\r\n-\t\t\s\s\s\sstatePtr->unreportedMsg\s=\smsg;\r\n-\t\t\s\s\s\sif\s(msg\s!=\sNULL)\s{\r\n-\t\t\tTcl_IncrRefCount(msg);\r\n+\t\t\s\s\s\s/*\r\n+\t\t\s\s\s\s\s*\sBug\s97069ea11a:\sIf\sunreportedError\sis\sset,\salways\sset\r\n+\t\t\s\s\s\s\s*\san\serror\smessage\sto.\r\n+\t\t\s\s\s\s\s*/\r\n+\t\t\s\s\s\sif\s(msg\s==\sNULL)\s{\r\n+\t\t\tmsg\s=\sTcl_NewStringObj(Tcl_ErrnoMsg(errorCode),-1);\r\n\s\t\t\s\s\s\s}\r\n+\t\t\s\s\s\sTcl_IncrRefCount(msg);\r\n+\t\t\s\s\s\sstatePtr->unreportedMsg\s=\smsg;\r\n\s\t\t}\selse\s{\r\n\s\t\t\s\s\s\s/*\r\n\s\t\t\s\s\s\s\s*\sAn\sold\sunreported\serror\sis\skept,\sand\sthis\serror\sthrown\r\n</verbatim>\r\nUnfortunately,\sthis\sfield\sattends\sa\s4\selements\slist\sstructure\sto\sreport\sin:\r\n\s\s\s*\s\s\sTclChanCaughtErrorBypass()\r\n\s\s\s*\s\s\s>\sUnmarshallErrorResult(interp,msg="host\sis\snot\sconnected")\r\nand\sonly\sthe\serrorNo\sis\sset,\snot\sthe\smessage.\r\nThe\sfollowing\spatch
J login oehhar
J mimetype text/x-fossil-wiki
J username oehhar
K 97069ea11aca3783949c0379725eed90f5573c23
U oehhar
Z 488349e0fc8826c510315dbe861cc3cc