Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttsession(1) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tt_type_comp(1)

ttsession(1)

NAME

ttsession − the ToolTalk message server

SYNOPSIS

ttsession [ -a level ] [ -d display ] [-spStvhN] [ - { E|X }]
[ -c [command] ]

DESCRIPTION

ttsession is the ToolTalk message server.  This background process must be running before any messages can be sent or received.  Each message server defines a "session". 

The message server has no user interface and typically runs in the background, started either by the user’s .xinitrc file or automatically by any program which needs to send a message.  The message server reacts to two signals.  If it receives the USR1 signal, it toggles trace mode on or off (see the -t option below).  If it receives the USR2 signal, it rereads the types file. 

OPTIONS

−a level
Set the server authentication level.  The level must be unix,xauth, or des.

-c [command] Starts a process tree session and runs the given command.  The special environment variable _SUN_TT_SESSION will be set to the name of this session.  Any process started with this variable in the environment will default to being in this session. If command is omitted the value of $SHELL is used instead.  Everything after −c on the command line is taken as the command to be executed, so −c should be the last option. 

−p Prints the name of a new process tree session on stdout, and then forks a background instance of ttsession to manage this new session. 

−S Directs ttsession not to fork a background instance to manage its session. 

−N Maximizes the number of clients allowed to connect to (i.e. open procids in) this session, by raising the soft limit on the number of open file descriptors (RLIMIT_NOFILE) all the way to the hard limit.  See setrlimit(2).  On SunOS 5.x, the increase is from about 50 to about 500.  The default is not to maximize, because some of the system libraries allocate up front an amount of storage that is linear in RLIMIT_NOFILE, which hurts the paging performance of ttsession. 

−d display
Directs ttsession to start an X session for the given display.  Normally, ttsession uses the DISPLAY environment variable. 

−s Silent - don’t print any warning messages. 

−t Turn on trace mode.  Tracing is very helpful for seeing how messages are dispatched and delivered.  The output is very voluminous.  See the signals above for how to turn tracing on and off during execution. Tracing displays the state of a message when it is first seen by ttsession.  The lifetime of the message is then shown by showing the result of matching the message against type signatures (dispatch stage) and then showing the result of matching the message against any registered message patterns (delivery stage). Any attempt to send the message to a given process is also shown together with the success of that attempt. 

−X Read in the types from the XDR format databases in $HOME/.tt/types.xdr, /etc/tt/types.xdr, and $OPENWINHOME/etc/tt/types.xdr.  These three locations can be overridden by setting $TTPATH.  See Environment, below. 

−E Read in the types from the Classing Engine database.  If neither −E nor −X is given, −X is assumed. 

−v Print out the version number and exit. 

−h Print help on invoking ttsession and exit. 

ENVIRONMENT

SUN_TTSESSION_CMD
If set, this will be used by all ToolTalk clients as the command to use for auto-starting ttsession. 

TTPATH
In XDR mode, a colon-separated list of directories that tells ToolTalk where to find the ToolTalk types databases.  The format of this variable is userDir[:systemDir[:networkDir]].

CEPATH
In Classing Engine mode, this variable tells the Classing Engine where to find the databases that contain (among other things) ToolTalk types.  See ce_db_build(1). 

_SUN_TT_ARG_TRACE_WIDTH
How many characters of argument and context values to print when in trace mode.  The default is to print the first 40 characters.

_SUN_TT_SESSION
ttsession uses this variable to communicate its session ID to the tools that it starts.  If this variable is set, the ToolTalk client library uses its value as the default session ID. 

DISPLAY
If $_SUN_TT_SESSION is not set and $DISPLAY is set, then $DISPLAY names the X display that ttsession will connect to when it is auto-started by a ToolTalk client.  Typically $_SUN_TT_SESSION is set by ttsession when running in process tree mode, although it can be set manually by a sophisticated user, and $DISPLAY is used when ttsession is auto-started while running under OpenWindows. 

If ttsession is run with the -d option and $DISPLAY is not set, ttsession sets $DISPLAY to be the value of the -d option.  This helps ToolTalk clients to find the right X display when they are auto-started by ttsession. 

_SUN_TT_TOKEN
This variable lets the ToolTalk client library know it has been invoked by ttsession, so that the client can confirm to ttsession that it started successfully. 

_SUN_TT_FILE
When ttsession invokes a tool to receive a message, it copies the file attribute (if any) of the message into this variable. 

FILES

$HOME/.tt/types.xdr
User’s ToolTalk types database for XDR mode

/etc/tt/types.xdr System ToolTalk types database for XDR mode

$OPENWINHOME/etc/tt/types.xdr
Network ToolTalk types database for XDR mode

$HOME/.cetables/cetables

/etc/cetables/cetables

$OPENWINHOME/lib/cetables/cetables
Classing Engine databases containing ToolTalk types for CE mode.  See ce_db_build(1). 

SEE ALSO

tt_type_comp(1)

DIAGNOSTICS

When the −c child process exits, ttsession will exit with the exit code of the dead child.  Otherwise, exit codes are as follows:

0 Normal termination.  Without the −c or −S options, a zero exit status means ttsession has successfully forked an instance of itself that has begun serving the session. 

1 Abnormal termination.  ttsession was given invalid command line options, was interrupted by SIGINT, or encountered some internal error. 

2 Collision.  Another ttsession was found to already be serving the session. 

SunOS 5.4  —  Last change: 17 Nov 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026