.
D 2010-01-19T04:58:34
J icomment The\sdiagnosis\sis\sbasically\sok\s...\n\nTcl_CreateChannelHandler\sregisters\sthe\snew\shandler\swe\swant,\sthis\stells\sthe\sIO\ssystem\sthat\swe\sare\swilling\sto\saccept\swrite\sevents,\sthis\scauses\s'UpdateInterest'\sto\sbe\scalled,\swhich\scalls\sthe\s"watch"\scommand\sof\syour\sreflected\schannel,\swhich\sdecides\sthat\swe\sshould\ssend\sthe\sevent\sNOW,\svia\s'postevent',\swhich\scalls\sTcl_NotifyChannel,\sand\sthrough\sthat\sthe\sdesignated\scallback,\si.e.\sTclChannelEventScriptInvoker,\swhich\snow\soperates\son\sthe\sallocated,\sbut\sotherwise\suninitialized\sEventScript\sstructure.\sBOOM.\n\nThe\sC-level\schannels\sdo\snot\shave\sthis\sproblem\sbecause\snone\sof\sthem\scalls\sTcl_NotifyChannel\simmediately\sin\stheir\swatch\sproc,\sbut\sonly\swhen\san\sevent\sis\sactually\ssigned\sby\sthe\snotifier\s(FileHandler\scallbacks).\n\nFor\sthe\sreflected\schannel\sthe\sproblem\sis\sthat\sthe\s'chan\spostevent'\scommand\shas\sno\sreliable\sway\sof\sdetecting\sthat\sit\sis\scalled\sdirectly\sfrom\sthe\s'watchProc'\s...\sIf\swe\shad\sthat\swe\scould\sthrow\san\serror\smessage\stelling\sthe\suser\sthat\sthe\spostevent\sshould\sbe\sdefered.\n\nWithout\sthat\syour\spatch\sis\sin\sessence\sthe\sway\sto\sgo.\sInitialize\severything\sin\sthe\sstructure\sbefore\swe\screate\sand\sregister\sthe\schannel\shandler\swith\sthe\sIO\score.\n\nRegarding\s"without\sreplicating\sso\smany\scommands",\sthat\sis\spossible,\sbut\swill\srequire\sa\sboolean\svariable\sto\sremember\sif\swe\shave\sto\scall\sTcl_CreateChannelHandler\sor\snot,\si.e.\ssomething\swhich\sholds\sthe\sresult\sof\s'esPtr\s==\sNULL'\seven\safter\swe\shave\sallocated\sthe\sstructure\sand\sassigned\sto\sesPtr.\n\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 2918110fffffffffffffffffffffffffffffffff
U andreas_kupries
Z 8139571740af2df0c1d0ea4a551ff96a