.
D 2002-03-06T20:18:16
J icomment Logged\sIn:\sYES\s\nuser_id=79902\n\nThe\sproblem\swith\stcflush\son\sexit\sis\sthat\sit\scan\snuke\soutput\nin\sthe\sOS\sbuffers\sthat\scame\sfrom\sstderr\s(say\s"sayonara"\sto\ndebugging\smessages!)\s\sFurther\sinvestigation\sfound\sthat\sthis\ncould\sstill\shappen\seven\swith\ssome\sfairly\selaborate\smeasures\nto\sprevent\sit\s(like\sbarring\stcflush\sfrom\soperating\son\sFDs\s0,\n1\sand\s2)\sbecause\sit\sis\sa\srace\sbetween\sthe\sdata\sbeing\sgrabbed\nby\sthe\stty\sand\sdisplayed,\sand\sthe\stcflush\son\san\sunrelated\nchannel\s(you'll\sneed\sthe\s[open\s[exec\stty]]\saddition\nmentioned\sbelow\sto\senable\sthis\sbehaviour.)\n\nSo\sas\sto\smake\ssure\sthat\speople\sjust\susing\sTcl\snormally\swould\nnot\ssee\sthe\sproblem,\sand\sgiven\sthe\sshort\stimescale\swe\swere\nworking\son\sw.r.t.\sthe\s8.4a4\srelease,\sthe\stcflush\swas\schanged\nto\sa\stcdrain\s(whose\sbehaviour\smeets\smore\swhat\snon-serial\npeople\sthink\sof\sby\sa\sflush!)\seven\sthough\sthis\sis\sclearly\snot\nwhat\syou\swere\sintending\swhen\syou\swrote\sthe\scode.\s\sA\sbetter\nfix\swill\srequire\sapplication-input\s(since\sboth\sbehaviours\nare\sright\sin\scertain\scircumstances)\swhich\smeans\sthere's\sroom\nfor\sanother\sthing\sto\s[fconfigure],\se.g.\n\n\s\s\sfconfigure\s$fd\s-onclose\swait/discard\n\n(Reset\ssemantics\sprobably\sought\sto\sbe\shandled\sin\sthe\ssame\nway,\sbecause\sthey\sare\sequally\ssurprising\swhen\sthey\shit\sthe\ncontrolling\sterminal\sand\sboth\sstyles\sof\sbehaviour\scan\sbe\nconsidered\sto\sbe\scorrect\sin\ssome\scircumstances.)\n
J login dkf
J mimetype text/plain
J username dkf
K 525783ffffffffffffffffffffffffffffffffff
U dkf
Z feb5aa645939ff3b4f315f67eca38e72