SYNOPSIS
#include <tcl.h>
Tcl_Channel Tcl_GetStdChannel(type)
Tcl_SetStdChannel(channel, type)
ARGUMENTS
- int type (in)
-
The identifier for the standard channel to retrieve or modify. Must be one of TCL_STDIN, TCL_STDOUT, or TCL_STDERR.
- Tcl_Channel channel (in)
-
The channel to use as the new value for the specified standard channel.
DESCRIPTION
Tcl defines three special channels that are used by various I/O related commands if no other channels are specified. The standard input channel has a channel name of stdin and is used by read and gets. The standard output channel is named stdout and is used by puts. The standard error channel is named stderr and is used for reporting errors. In addition, the standard channels are inherited by any child processes created using exec or open in the absence of any other redirections.
The standard channels are actually aliases for other normal channels. The
current channel associated with a standard channel can be retrieved by calling
A new channel can be set for the standard channel specified by
type
by calling
If
If one of the standard channels is set to NULL, either by calling
PORTABILITY
Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
Tcl_Close() ,Tcl_CreateChannel()
PTC MKS Toolkit 10.5 Documentation Build 40.