ToolTalk User's Guide

How can I isolate my debugging tool from all the other tools using the ToolTalk service?

To isolate your debugging tool, use the "process tree session" mode. This mode places the session name in an environment variable to find the ttsession process. To use this mode, do the following:

  1. Start a new process tree session with trace mode turned on.

    % ttsession -t -c $SHELL
    *
    * ttsession (version 1.3, library 1.3)
    *
    ttsession: starting
    % 

    ttsession starts, sets the environment variable, and forks the given command ($SHELL). You are now running in a subshell. All the commands run from this subshell will use the ttsession started from the command line. You can check the value of the TT_SESSION environment variable for the session id of this new ttsession.

  2. Inside the subshell, run the test programs:

    % ./my_receiver &
    [1] 4532
    % ./my_sender &
    
    .. and look at the output of the ttsession trace.

  3. Exit the subshell after testing.

    If you start any tool that uses the ToolTalk service in the subshell, it uses the process tree ttsession, not the X-session ttsession, which will produce undefined results.