<i>Closing the std* channels and opening replacements sometimes doesn't register the std* channel name in interps</i> status still Open with 3 other changes
by
.
D 2023-05-04T13:04:21.420
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"}
J login cyan
J mimetype text/plain
K 5338d8e82fb3e23658b61bb60ea82cdd2d581c61
U cyan
Z a4cf6985e602ac5747f7927f81755ad7