.
D 2003-09-26T14:12:13
J assignee andreas_kupries
J cmimetype text/plain
J comment tcltk-8.4.1\scompiled\sfrom\sthe\sunix/\sdirectory\son\sOS\sX\n10.2.6.\ntcltk-8.3.4\sthat\scomes\sprecompiled\swith\smy\sOS\sX\sis\snot\naffected.\n\nWhen\stclsh\sis\sused\sin\sa\spipeline,\sstdout\sis\streated\nlike\sa\ssocket.\sThis\sis\sbad\sbecause\sit\sdefaults\sto\sCR/LF\nline\sendings,\snot\sthe\sLF\sthat\sis\sexpected\sand\nappropriate\sfor\sa\sUnix\splatform\swhen\sparsing\spiped\ncommands.\sSimple\sUnix\sfile\sdescriptor\sredirection\sdoes\nnot\shave\sthis\sproblem.\n\nHere\sare\sthree\sexamples\sthat\slook\scorrect:\n\n%\stclsh\n%\sfconfigure\sstdout\n-blocking\s1\s-buffering\sline\s-buffersize\s4096\s-encoding\nutf-8\s-eofchar\s{}\s-translation\scrlf\s-mode\s9600,n,8,1\n-xchar\s{p\sr}\n[that\s{p\sr}\sis\sactually\suntypable\scharacters)\n\n%\secho\s"puts\s[fconfigure\sstdout]"\s|\stclsh\n-blocking\s1\s-buffering\sline\s-buffersize\s4096\s-encoding\nutf-8\s-eofchar\s{}\s-translation\scrlf\s-mode\s9600,n,8,1\n-xchar\s{p\sr}\n\n%\secho\s"puts\s[fconfigure\sstdout]"\s|\stclsh\s>\sfoo\s;\scat\n-vte\sfoo\n-blocking\s1\s-buffering\sline\s-buffersize\s4096\s-encoding\nutf-8\s-eofchar\s{}\s-translation\slf$\n\nSo\ssimple\soutput\sand\sredirected\soutput\sand\spiped\sinput\nare\sokay,\sbut\sif\soutput\sis\spiped:\n\n%\secho\s"puts\s[fconfigure\sstdout]"\s|\stclsh\s|\scat\s-vte\s\n-blocking\s1\s-buffering\sline\s-buffersize\s4096\s-encoding\nutf-8\s-eofchar\s{{}\s{}}\s-translation\s{auto\scrlf}\n-peername\s{0.0.0.0\s0.0.0.0\s0}\s-sockname\s{0.0.0.0\n0.0.0.0\s0}^M$\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter dmacks
J subsystem 27.\sChannel\sTypes
J title tclsh\streats\sUnix\spipelines\sas\ssockets
J type Bug
K 813087ffffffffffffffffffffffffffffffffff
U dmacks
Z a909601ff7f2b766e89465e11d769590