Skip to content
Tcl Source Code Artifact [40e62e6858]
Login

Artifact [40e62e6858]

Artifact 40e62e68586e37c00e6218979315a68fc03ec8c8:

Ticket change [40e62e6858] - New ticket [458490ffffffffff|458490ffff] <i>Leaking Open File Handles</i>. by crokusek on 2001-09-04 19:08:47.
D 2001-09-04T19:08:47
J assignee andreas_kupries
J cmimetype text/plain
J comment Hi\sAll,\s\n\nI\screate\san\sinterpreter\sfrom\s"C"\sevaluate\sthe\s\nfollowing\sscript:\s\n\nset\sF\s[open\s$rep_file\sw]\sputs\sinvalid_file_ptr\s\nthis_causes_an_error\sclose\s$F\s\n\nBecause\san\serror\soccurs\sin\sthe\s"puts"\sthe\s"close\s$F"\s\ndoes\snot\sget\scalled\sduring\sscript\sevaluation.\s\n\nOpening\sthe\sfile\sup\swith\sWordpad\sgives\sthe\s"File\sin\s\nuse\sby\sanother\sapplication."\sNote\sthat\swin-emacs\scan\s\nopen\sthe\sfile\sso\sit\sis\sa\swindows\sopen\sexclusive\stype\s\nopen\sthat\sgives\sthe\serror.\s\n\nAfter\sreporting\sthe\serror,\sthe\s"C"\sthen\scode\sdeletes\s\nthe\sinterpreter\sbut\sstill\sthe\sfile\shandle\smust\sbe\sopen\s\nbecause\sWordpad\sstill\scannot\sopen.\sI\shave\salso\stried\s\ncalling\sthis\sdirectly\sbefore\sand\safter\sdeleting\sthe\s\nInterpreter:\s\n\nTcl_DeleteAssocData(gpInterp,\s"tclIO");\s\n\nBut\sit\shas\sno\seffect\seither.\s:(.\s\n\nI\shave\sverified\sthis\sbug\sto\sexist\sin\s8.0\s8.3\sand\s8.4\s\n\nCan\sanyone\sprovide\sworkaround.\sDo\sI\shave\sto\s\ntrap\s"open's"\sand\s"close's"\smyself?\s\n\nNote\sthat\sreplacing\sthe\sillegal\s"puts"\sstatement\swith\s\na\s"return"\sactually\shas\sthe\ssame\seffect.\s\n\nOf\scourse\sexiting\sthe\sprocess\scloses\sthe\shandle\sand\s\nwordpad\sis\sable\sto\sopen\sthe\sfile.\s\n\nThanks,\n\nChris\s\n\n
J foundin obsolete:\s8.4a4
J priority 5\sMedium
J resolution None
J status Open
J submitter crokusek
J subsystem 24.\sChannel\sCommands
J title Leaking\sOpen\sFile\sHandles
J type Bug
K 458490ffffffffffffffffffffffffffffffffff
U crokusek
Z ed838fb674593c5dbabc30cf05a99ff4