<i>Closing the std* channels and opening replacements sometimes doesn't register the std* channel name in interps</i>.
by
.
D 2023-05-04T13:02:25.132
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment In\sthe\sfollowing\scode,\sif\sstdout\swas\swritten\sto\sby\sthe\sparent\sinterp\sbefore\sclosing\r\nthen\sit\swill\sfail\son\sthe\sline\sthat\sconfigures\sthe\s(new)\sstdout\schannel\swith\sthe\serror:\r\n\r\ncan\snot\sfind\schannel\snamed\s"stdout"\r\n\r\nIf\sthe\sfirst\sline\sthat\soutputs\sto\sstdout\sin\sthe\sparent\sinterp\sis\scommented\sout,\sthe\scode\r\nworks\sas\sexpected:\r\n\r\ninterp\screate\sfoo\r\nputs\s"before,\sparent"\s\s\s;#\sWorks\sif\sthis\sline\sis\scommented\sout\r\ninterp\seval\sfoo\s{puts\sstderr\s"before,\schild"}\r\ninterp\seval\sfoo\s{close\sstdout}\r\ninterp\seval\sfoo\s[list\sopen\s[exec\stty]\sw]\r\ninterp\seval\sfoo\s{chan\sconfigure\sstdout\s-buffering\sline\s-blocking\s0}\r\nputs\s"New\sstdout,\sfrom\sparent"\r\ninterp\seval\sfoo\s{puts\s"New\sstdout,\sfrom\schild";\sflush\sstdout}
J foundin 8.7a6
J is_private 0
J login cyan
J priority 5\sMedium
J private_contact 54152f94cb1628c0c148b4b5708ace53216227b0
J resolution None
J severity Minor
J status Open
J submitter cyan
J subsystem 25.\sChannel\sSystem
J title Closing\sthe\sstd*\schannels\sand\sopening\sreplacements\ssometimes\sdoesn't\sregister\sthe\sstd*\schannel\sname\sin\sinterps
J type Bug
K 5338d8e82fb3e23658b61bb60ea82cdd2d581c61
U cyan
Z e3c51eb8261dea531b5fb2ba27e8f6ba