Overview
| Artifact ID: | d6638170b799423ccc248b10ee676805d3cac44e |
|---|---|
| Ticket: | 813087ffffffffffffffffffffffffffffffffff
tclsh treats Unix pipelines as sockets |
| User & Date: | dmacks on 2003-09-26 14:12:13 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- comment changed to:
tcltk-8.4.1 compiled from the unix/ directory on OS X 10.2.6. tcltk-8.3.4 that comes precompiled with my OS X is not affected. When tclsh is used in a pipeline, stdout is treated like a socket. This is bad because it defaults to CR/LF line endings, not the LF that is expected and appropriate for a Unix platform when parsing piped commands. Simple Unix file descriptor redirection does not have this problem. Here are three examples that look correct: % tclsh % fconfigure stdout -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} -translation crlf -mode 9600,n,8,1 -xchar {p r} [that {p r} is actually untypable characters) % echo "puts [fconfigure stdout]" | tclsh -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} -translation crlf -mode 9600,n,8,1 -xchar {p r} % echo "puts [fconfigure stdout]" | tclsh > foo ; cat -vte foo -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} -translation lf$ So simple output and redirected output and piped input are okay, but if output is piped: % echo "puts [fconfigure stdout]" | tclsh | cat -vte -blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {{} {}} -translation {auto crlf} -peername {0.0.0.0 0.0.0.0 0} -sockname {0.0.0.0 0.0.0.0 0}^M$ - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dmacks"
- subsystem changed to: "27. Channel Types"
- title changed to: "tclsh treats Unix pipelines as sockets"
- type changed to: "Bug"