Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP ToolTalk Programmer's Guide > Chapter 2 ToolTalk Service Overview

Starting a ToolTalk Session

» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Glossary

The ToolTalk message server, ttsession, automatically starts when you open communication with the ToolTalk server or when CDE is started. This background process must be running before any messages can be sent or received. Each message server defines a session.

NOTE: A session can have more than one session identifier.

To manually start a session, enter the following command on the command line:

ttsession [-hNpsStv][-E| -X][-a level][-d display][-c [command]]

See Table 2-1 for a description of the ttsession command line options.

Table 2-1 ttsession Command Line Options

ArgumentDescription
-a levelhe level must be unix or des.
-c commandStart process tree session and run the given command. The ttsession utility sets the environment variable TT_SESSION to the name of this session. Any process started with this variable in the environment, defaults to being in this session. If command is omitted, ttsession invokes the shell named by the SHELL environment variable. Everything after -c on the command line is used as the command to be executed.
-d displayDirects ttsession to start an X session for the given display. Normally, ttsession uses the $DISPLAY environment variable.
-ERead in the types from the Classing Engine data base. If neither-E nor -X is given, -X is assumed.
-hWrite a help message to standard error that describes the command syntax of ttsession, and exit.
-NMaximize the number of clients allowed to (in other words, open procids in) this session by attempting to raise the limit of open file descriptors. The precise number of clients is system-dependent; on some systems this options may have no effects.
-pWrite the name of a new process tree session to standard output, and then fork a background instance of a new ttsession to manage this new session.
-sSilent. Do not write any warning messages to standard error.
-SDo not fork a background instance to manage the ttsession session.
-tTurn on trace mode. If trace mode is turned on while ttsession is running, messages appear on the console.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 shown along with the success of that attempt.
-vWrite the version number to standard output and exit.
-XRead in the types from the following XDR format databases: $HOME/.tt/types.xdr<implementation-specific system and network databases>/usr/dt/appconfig/tttypes/types.xdrThe database are listed in order of descending precedence. Entries in $HOME/.tt/types.xdr override any like entries in the database lower in the list.These databases can be overridden by setting the TTPATH environment variable.
Note - If neither the -c, -d, or -p options are specified, ttsession starts an X session for the display specified in the $DISPLAY environment variable.

 

ttsession responds to two signals.

  • If it receives the SIGUSR1 signal, it toggles the trace mode on or off.

  • If it receives the SIGUSR2 signal, it rereads the types file.

Background and Batch Sessions

Run your application as its own session if it runs as a background job, in a batch session, or in a session bound to a character terminal. To run your application in its own session, use the -c parameter with the ttsession command, as follows:

ttsession -c [ command-to-run-in-batch ]

This command will fork off a shell from which you can run your application.

NOTE: The -c parameter must be the last option on the command line; any characters placed after the -c parameter on the command line are taken as the command to be executed.

X Window System

To establish a session under the X Window System, execute ttsession either without arguments (which takes the display from the $DISPLAY environment variable) or specify the display with the -d parameter as follows:

ttsession -d :0

When ttsession is invoked, it immediately forks and the parent copy exits; the process managing the session executes in the background. The session is registered as a property, named by _TT_SESSION on the root window of screen 0; the host and port number is given for communication with the process managing the session.

Locating ttsession

To display the sessid of the session for the Xdisplay:

xprop -root | grep _TT_SESSION

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.