.
D 2017-08-11T15:46:05.956
J assignee nobody
J closer nobody
J cmimetype text/html
J comment I\shave\screated\sa\sfile\schannel\swith\san\sopen\sfile\sdescriptor\s<em>fd</em>:\r\n\r\n<verbatim>\r\n\s\s\s\sm_chan\s=\sTcl_MakeFileChannel(fd,\sTCL_READABLE);\r\n</verbatim>\r\n\r\n<p>\r\nLater\sI'm\sclosing\sthe\sfile\schannel,\sbut\sat\sthis\stime\sthe\sfile\sdescriptor\sis\salready\sclosed\s(the\sfile\sdescriptor\scomes\sfrom\san\sexternal\slibrary):\r\n\r\n<verbatim>\r\n\s\s\s\sTcl_Close(NULL,\sm_chan);\r\n</verbatim>\r\n\r\n<p>\r\nNow\sin\sfunction\s<code>PlatformEventsControl()</code>\s[unix/tclEpollNotfy.c:245]\s<code>Tcl_Panic()</code>\swill\sbe\sinvoked,\sand\smy\sprogram\sis\saborting.\sThis\sbehavior\sis\snew,\sand\sI\sthink\sthat\sthis\sshould\snot\shappen\sat\sall,\sall\ssystem\sfunctions\sare\sable\sto\swork\swith\sclosed\sfile\sdescriptors\s(without\saborting\sthe\sprogram).\sPlease\snote\sthat\sin\smy\scase\sthe\sfile\sdescriptor\scomes\sfrom\san\sexternal\slibrary,\sso\sI\shave\sno\scontrol\sabout\sit's\sstate.\sOf\scourse\sI\scould\scheck\sthe\sstate\sbefore\scalling\s<code>Tcl_Close()</code>,\sbut\sthis\sis\sno\ssolution,\sbecause\show\sshould\sI\srelease\sthe\screated\schannel\swhen\snot\swith\s<code>Tcl_Close()</code>?\sFurthermore\sthis\sbehavior\sis\sincompatible\sto\sprevious\sTcl\sversion\s8.6.
J foundin 8.7
J is_private 0
J login gcramer
J priority 5\sMedium
J private_contact 9b7155594aadef44d10a978838b8fe108cdafdd1
J resolution None
J severity Important
J status Open
J submitter gcramer
J subsystem 25.\sChannel\sSystem
J title Crash\s(Tcl_Panic)\swhen\sclosing\sa\sfile\schannel
J type Bug
K b0e16e3f34ff4c76c1177126380e9fb0d7535d49
U gcramer
Z 4e46694a9de22dbb34c9fb747bf26e27