1. Introducing the ToolTalk Service
2. An Overview of the ToolTalk Service
4. Setting Up and Maintaining the ToolTalk Processes
Location of the ToolTalk Service Files
Installing the ToolTalk Database Server
Confirming that the rpc.ttdbserverd is installed on a system.
Confirming that the rpc.ttdbserverd is running on a system.
From the Solaris Distribution CD-Rom
Running the New ToolTalk Database Server
Redirecting the ToolTalk Database Server
Redirecting the File System Partition
5. Maintaining Application Information
6. Maintaining Files and Objects Referenced in ToolTalk Messages
7. Participating in ToolTalk Sessions
13. Managing Information Storage
A. Migrating from the Classing Engine to the ToolTalk Types Database
B. A Simple Demonstration of How the ToolTalk Service Works
This section addresss ToolTalk and related environment variables.
There are several ToolTalk environment variables that may be set. describes these variables.
Table 4-2 Environment Variables
|
A process is given a modified environment when it is automatically started by the ToolTalk service. The modified environment includes the environment variables $TT_SESSION, $TT_TOKEN, and any contexts in the start-message whose keyword begins with the dollar sign symbol ($). Optionally, the environment variable $TT_FILE may also be included in the modified environment if it is a file-scoped message.
Note - If the tt_open call will be invoked by a child process, the parent process must propagate the modified environment to that child process.
The TMPDIR environment variable is another environment variable that you can set to manipulate the ToolTalk development environment. For example, the following line redirects files to the /var/tmp directory.
TMPDIR=/var/tmp
The start string is always executed on the host on which ttsession is running; however, the executed process can start another process on another host.
To do this, first make your start string be similar to the following:
# rsh farhost myprog
Next, to make sure myprog is placed in the right session and receives its initial message, you need to propagate the important ToolTalk environment variables. The ttrsh shell script shown in propagates these environment variables.
Example 4-1 Propagating ToolTalk Environment Variables
#! /bin/sh # Runs a command remotely in background, by pointing stdout and stderr # at /dev/null. By running this through the Bourne shell at the other end, # we get rid of the rsh and rshd. #set -x user= debug= HOST=${HOST-`hostname`} if [ "$1" = "-debug" ]; then debug=1 shift fi if [ $# -lt 2 -o "$1" = "-h" -o "$1" = "-help" ]; then echo "Usage: ttrsh [-debug] remotehost [-l username] \ remotecommand" echo "Usage: ttrsh [-h | -help]" exit 1 else host=$1 shift if test "$1" = "-l" ; then shift user=$1 shift fi fi xhostname=`expr "$DISPLAY" : "\([^:]*\).*"` xscreen=`expr "$DISPLAY" : "[^:]*\(.*\)"` if test x$xscreen = x; then xscreen=":0.0" fi if test x$xhostname = x -o x$xhostname = x"unix"; then DISPLAY=$HOST$xscreen fi if [ "$user" = "" ]; then userOption="" else userOption="-l $user" fi if [ $debug ]; then outputRedirect= else outputRedirect='> /dev/null 2>&1 &' fi ( echo "OPENWINHOME=$OPENWINHOME;export OPENWINHOME;\ TT_SESSION=$TT_SESSION;export TT_SESSION;\ TT_TOKEN=$TT_TOKEN;export TT_TOKEN;TT_FILE=$TT_FILE;\ export TT_FILE;DISPLAY=$DISPLAY;export DISPLAY;($*)" \ $outputRedirect | rsh $host $userOption /bin/sh & ) &
Message contexts have a special meaning when the ToolTalk service starts an application. If the name of a context slot begins with a dollar sign ($), the ToolTalk service interprets the value as an environment variable. For example, the following uses the value of context slot $CON1.
start "my_application $CON1"