Skip to content
Tcl Source Code Artifact [8c170d10fe]
Login

Artifact [8c170d10fe]

Artifact 8c170d10fea621940eb20a6045bc60c2a1b06fee:

Ticket change [8c170d10fe] - Ticket [1343161fffffffff|1343161fff] <i>exec implemenation fails to close() open file descriptors</i> status still Open with 4 other changes by illumino on 2008-04-07 11:05:03.
D 2008-04-07T11:05:03
J icomment Logged\sIn:\sYES\s\nuser_id=426773\nOriginator:\sYES\n\nBackground:\sA\sthird-party\ssoftware\svendor\ssupplied\sa\sTCL\spackage\sincluding\sa\sshared\slibrary\swhich\screated\snetwork\sconnections.\sThe\sintended\sTCL/TK\sapplication\swhich\sthey\salso\sprovided,\sspawned\smozilla\s&\sacroread\sprocesses\swhich\ssurvived\sthe\sexecution\sof\sthe\sapplication\s(occasionally,\sthey\swere\sthere\sas\sonline\shelp\sresources\sfor\sthe\sapplication).\sThe\sproblems\sstart\swhen\sthe\sapplication\sgoes\saway\sand\sthe\ssub-programs\sare\sleft\sholding\sopen\ssockets,\swhich\sthey\sare\sof\scourse,\snot\sservicing.\sThe\sserver\sdoes\snot\ssee\sthat\sthe\sclient\shas\sexited,\sthe\sfds\sare\sstill\sopen,\sso\sit\sbuffers\sdata\sfor\sthem,\sthinking\sthey'll\sget\sto\sit\ssoon.\sProblems\sensue...\sthink\smemory\s"leaks"\sin\sthe\sserver,\setc\s...\n\nNow\sthe\sTCL/TK\sapplication\sneeds\sthose\snetwork\sconnections\sand\sso\sthe\sclose\sof\sall\sopen\sfile\sdescriptors\sneeds\sto\sbe\sdone\safter\sthe\sfork()\sor\sat\sthe\stime\sof\sexec().\sIdeally\sthey\svendor\swould\shave\sused\sFD_CLOEXEC,\sbut\shonestly\sthey\saren't\sthat\sbright,\sand\sunresponsive\swould\sbe\sa\spolite\sway\sto\sput\sit.\sSo\sbeing\sperl\sperson\s(I\shope\syou'll\sforgive\sme\sfor\sthat)\sI\sthought,\swell\sI'll\sjust\sclose\sthem\sall\smyself\sin\sthe\schild\sbefore\sstarting\sthe\sthese\shelper\sapps.\n\nI\sunderstood\sit\swas\sreally\sa\svendor\sissue,\sbut\sthe\sPerl\sprogrammer\sin\sme,\sthought\stheir\sshould\sbe\san\soption\son\sexec\sto\shandle\ssuch\ssituations\sgiven\sthat\sa\sTCL\sprogrammer\scan\snot\smanually\sdo\sa\sfork()/close(ALL)/exec()\ssequence\sof\scommands\sas\swould\sbe\spossible\sin\sPerl\sor\sC.\sSorry\sI\shave\sworded\sthing\sbadly\sand\swent\soff\son\sa\stangent,\sI\snow\sconsider\sthat\sit\sreally\sis\sa\sfeature\srequest,\sbecause\sas\shas\sbeen\spointed\sout\sTCL/TK\sdoes\shandle\sall\sits\sFDs\scorrectly.\n\nI'm\spersonally\shappy\sif\sthe\sTCL\steam,\ssay\s"well,\swe\sshould\snot\sbe\sresponsible\sfor\sthe\sbad\sC\scoding\sof\sothers"\sand\sclose\sthe\sissue.\sIt\sjust\sseemed\s(at\sthe\stime)\slike\sa\suseful\sfeature\sto\shave.\sMy\sthoughts\sare\s"Won't\sFix"\sand\sbe\sdone\swith\sit,\sbut\sI'll\sleave\sthat\sto\sthe\sdevelopment\steam,\smay\sthey\smight\sthink\sits\suseful.\n\n
J login illumino
J mimetype text/plain
J username illumino
K 1343161fffffffffffffffffffffffffffffffff
U illumino
Z 337e468f4ba7d8c4b76533ab502357ae