Skip to content
Tcl Source Code Artifact [af3405ddee]
Login

Artifact [af3405ddee]

Artifact af3405ddeefdfdc17b9058a7e5aadf9c18ca1faf:

Ticket change [af3405ddee] - Ticket [1995063fffffffff|1995063fff] <i>Doc: example in fileevent manpage is bad.</i> status still Open with 4 other changes by ferrieux on 2008-06-16 21:06:59.
D 2008-06-16T21:06:59
J icomment Logged\sIn:\sYES\s\nuser_id=496139\nOriginator:\sNO\n\nad\sAndreas:\shuh\s?\n\n>\sfileevent-callbacks\sare\salso\sfired\swhen\sprevious\sgets\s\n>\sreturned\swith\sno\seof-condition,\sbut\sthe\schannel\sdied\s\n>\safterwards\son\speer's\sbehalf\n\nThis\sis\sjust\splain\swrong.\n[eof]\sis\snot\supdated\suntil\sa\sread\soperation\shas\sbeen\stried.\nTo\sconvince\syourself\sof\sthis:\n\n\s\s\s\sset\sn\s[open\s/dev/null\sr]\s;#\sworks\swith\sNUL:\son\sWindows\stoo\n\s\s\s\sfileevent\s$n\sreadable\s{puts\sstderr\sEOF:[eof\s$n];close\s$n}\n\s\s=>\sEOF:0\n\nHence\sthe\sidiom\sproposed\sby\sDonal\swhich\sis\sminimal,\saccurate\s(no\sextra\sempty\sline),\sand\ssyscall-efficient\s([eof]\sonly\sreads\smemory).\n\n\n\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 1995063fffffffffffffffffffffffffffffffff
U ferrieux
Z 47eb17dd9e318ae717bfd1a0f5e08ee9