Artifact
d229dd74bf5493e1d1cade14cc8e2609d63fbeb3:
Ticket change
[d229dd74bf]
- New ticket
[2407783fffffffff|2407783fff] <i>Seek causes IO channel to be shared between all interps</i>.
by
sbron on
2008-12-08 22:44:14.
D 2008-12-08T22:44:14
J assignee hobbs
J cmimetype text/plain
J comment I\snoticed\sthat\s'seek\s0'\son\sa\sfile\shandle\smakes\sthe\shandle\saccessible\sin\sall\sinterps.\sI\scan't\sfind\sany\sevidence\sin\sthe\sdocs\sthat\sthis\sis\sthe\sintended\sbehavior.\n\nExample:\sThe\sfollowing\sscript\swill\sdump\s2\sx\sfour\sbytes\sfrom\s/dev/random:\n\ninterp\screate\sfoo\ninterp\screate\sbar\n\nset\sf\s[open\s/dev/random\srb]\n\ninterp\seval\sfoo\s{\n\s\s\s\sproc\sbytes\s{fh}\s{\n\s\s\s\s\s\s\s\sbinary\sscan\s[read\s$fh\s4]\sH*\shex\n\s\s\s\s\s\s\s\sputs\s$hex\n\s\s\s\s\s\s\s\sclose\s$fh\n\s\s\s\s}\n}\n\ninterp\seval\sbar\s{\n\s\s\s\sproc\sbytes\s{fh}\s{\n\s\s\s\s\s\s\s\sbinary\sscan\s[read\s$fh\s4]\sH*\shex\n\s\s\s\s\s\s\s\sputs\s$hex\n\s\s\s\s\s\s\s\sclose\s$fh\n\s\s\s\s}\n}\n\nseek\s$f\s0\ninterp\seval\sfoo\s[list\sbytes\s$f]\ninterp\seval\sbar\s[list\sbytes\s$f]\nclose\s$f\n\nWithout\sthe\sseek\scommand\sit\sreports\san\serror\sas\sexpected:\ncan\snot\sfind\schannel\snamed\s"file5"\n\s\s\s\swhile\sexecuting\n"read\s$fh\s4"\n\s\s\s\s(procedure\s"bytes"\sline\s2)\n\s\s\s\sinvoked\sfrom\swithin\n"bytes\sfile5"\n\s\s\s\sinvoked\sfrom\swithin\n"interp\seval\sfoo\s[list\sbyte\s$f]"\n\n\nSuSE\slinux\s11.0\nKernel\s2.6.25.18-0.2-pae\nTcl\s8.5.5\n
J foundin obsolete:\s8.5.5
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter sbron
J subsystem 20.\s[interp]
J title Seek\scauses\sIO\schannel\sto\sbe\sshared\sbetween\sall\sinterps
J type Bug
K 2407783fffffffffffffffffffffffffffffffff
U sbron
Z 2bec2e95d7463ee4ab04a749380c400a