<i>Doc: example in fileevent manpage is bad.</i> status still Open with 4 other changes
by
.
D 2008-06-16T22:32:22
J icomment Logged\sIn:\sYES\s\nuser_id=1350198\nOriginator:\sNO\n\nWhile\sthe\sstatement\sregarding\sEOF\smade\sby\sDonal\sand\sAlexander\sis\scorrect,\ssince\s[fileevent\sreadable]\shandler\sis\s*necessarily*\scalled\son\sa\snon-blocking\schannel\swhen\sa\sEOF\scondition\sis\sencountered,\sthe\swhole\sproblem\sjust\shas\sno\smeaning:\swhen\sI\shave\n\nproc\sRead\schan\s{\n\s\sif\s{[eof\s$chan]}\s{\n\s\s\s\sclose\s$chan\n\s\s\s\s...\n\s\s}\selse\s{\n\s\s\s\sset\sdata\s[read\s$chan]\n\s\s}\n}\n...\nfileevent\s$chan\sreadable\s[list\sRead\s$chan]\n\nin\smy\scode,\s[Read]\swill\sbe\scalled\son\sEOF\sanyway.\sJust\sthe\sevent\ssubsystem\swill\smake\sone\sextra\sinvocation\sof\sthe\scallback\sscript.\n\nFor\sinstance,\sreading\sfrom\sa\sfile\sof\slength\s0\susing\sa\sproc\ssimilar\sto\sthat\sshown\sabove\swill\sresult\sin\stwo\sinvocations\sof\sthe\sproc\s--\sone\sfor\s[read]\swhich\swill\sreturn\san\sempty\sstring\sand\sone\sresulting\sfrom\shitting\sEOF.\n\nSo\sin\sfact\sit's\snot\sa\sbig\sdeal\swhere\schecking\sfor\sEOF\sis\sperformed.\n
J login flatworm
J mimetype text/plain
J username flatworm
K 1995063fffffffffffffffffffffffffffffffff
U flatworm
Z 3cc9b2554c4a8411c736dd7c9f71ff32