Re: How does TCL (internals) generate output to stdout
- From: pmarin <pacogeek@xxxxxxxxx>
- Date: Sun, 22 Jan 2012 07:58:52 -0800 (PST)
On Jan 20, 10:31 pm, sam appleton <sam.s.apple...@xxxxxxxxx> wrote:
Hi
(TCL version 8.5.8)
I would like to understand how TCL generates output to stdout, for
example,
when I type at the tclsh prompt,
% set x 1
1
% set x
1
%
how does this output get generated? I traced the behavior of
Tcl_PutsObjCmd (tclIOCmd.c),
which calls Tcl_WriteObj (tclIO.c) which then calls Tcl_WriteChars,
which then calls DoWriteChars.
How does the above command sequence get captured and printed to
stdout?
I am trying to intercept the write function at some point with a patch
that allows me to log the output.
(externally wrapping functions like tee -a are not acceptable in the
environment our software goes into).
Sam
You can try script(1) if you are using Unix. The problem is that it
captures the terminal's control escapes.
pmarin
.
- References:
- How does TCL (internals) generate output to stdout
- From: sam appleton
- How does TCL (internals) generate output to stdout
- Prev by Date: teacup 8.5.11.0.295533 win32-ix86 crashes...
- Next by Date: Re: Strange behavior of button events
- Previous by thread: Re: How does TCL (internals) generate output to stdout
- Next by thread: Strange behavior of button events
- Index(es):
Relevant Pages
|