<i>Tcl_NotifyChannel man page: "no writable callback on pending flush" missing</i>.
by
.
D 2014-03-14T17:27:26.477
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment The\sman-page\sof\sTcl_NotifyChannel\s[http://www.tcl.tk/man/tcl8.6/TclLib/CrtChannel.htm]\swrites:\r\n<verbatim>\r\nTcl_NotifyChannel\sis\scalled\sby\sa\schannel\sdriver\sto\sindicate\sto\sthe\sgeneric\slayer\sthat\sthe\sevents\sspecified\sby\smask\shave\soccurred\son\sthe\schannel.\sChannel\sdrivers\sare\sresponsible\sfor\sinvoking\sthis\sfunction\swhenever\sthe\schannel\shandlers\sneed\sto\sbe\scalled\sfor\sthe\schannel.\r\n</verbatim>\r\n\r\nIt\ssuggests\sthat\sa\sregistered\swritable\sproc\sis\scalled\safter\sthis\snotification.\r\nThis\sis\snot\sthe\scase,\sif\sa\sflush\sis\spending\sand\sno\serror\soccured\sfor\sthe\schannel.\sIn\sthis\scase,\sa\sflush\sis\stried\sand\sno\sproc\sis\scalled.\r\n\r\nIMHO\sthis\sfact\sshould\sbe\snoted\son\sthe\sman-page.\r\n\r\nThe\sfollowing\scode\sbrings\sa\schannel\sin\sthe\sstate,\swhere\sa\sTcl_NotifyChannel\swill\snot\sfire\sthe\sfileevent:\r\n<verbatim>\r\nset\sh\s[socket\s-async\sunreachable\sa]\r\nfileevent\s$h\swritable\s"puts\sWrite;close\s$h"\r\nfconfigure\s$h\s-blocking\s0\r\nputs\s$h\sABC\r\nflush\s$h\r\n#\sNow\sa\sflush\sis\spending\son\sthe\ssocket\r\n#\sWhen\sthe\scahnnel\sdriver\snow\scalls\sTcl_NotifyChannel,\snothing\shappens\sthe\s</verbatim>\r\n\r\nOn\sa\ssecond\scall\sto\sTcl_NotifyChannel,\sthe\sfileevent\swill\sfire,\sas\sthe\sfirst\sflush\sfalied\sand\sit\sis\sin\serror\sstate.
J foundin 8.6.1
J is_private 0
J login oehhar
J priority 5\sMedium
J private_contact 0f366eb3e9e2fcab52b8ebacd197db9047186a5f
J resolution None
J severity Minor
J status Open
J submitter oehhar
J subsystem 25.\sChannel\sSystem
J title Tcl_NotifyChannel\sman\spage:\s"no\swritable\scallback\son\spending\sflush"\smissing
J type Bug
K ac661a684d5abbdd0ef142176cfeb7a1a4f600b8
U oehhar
Z 2d2dadcad5ddbd4f9fb442a470d3d327