 |
Index for Section 3 |
|
 |
Alphabetical listing for T |
|
tt_open(3)
CDE
NAME
tt_open - return the process identifier for the calling process
SYNOPSIS
#include <Tt/tt_c.h>
char *tt_open(void);
DESCRIPTION
The tt_open function returns the process identifier for the calling
process.
RETURN VALUE
The tt_open function also sets this identifier as the default procid for
the process. The tt_open3 function is typically the first ToolTalk
function called by a process.
The application must call tt_open3 before other tt_ calls are made.
However, there are two exceptions: tt_default_session_set3 and
tt_X_session3 can be called before tt_open.
A process can call tt_open more than once to obtain multiple procids. To
open another session, the process must make the following calls in the
order specified:
tt_default_session_set3
tt_open
RETURN VALUE
Upon successful completion, the tt_open function returns the character
value that uniquely identifies the process. The application can use
tt_ptr_error3 to extract one of the following Tt_status values from the
returned pointer: The operation completed successfully.
The ttsession1 process is not running and the ToolTalk service cannot
restart it.
APPLICATION USAGE
The application should use tt_free3 to free any data stored in the address
returned by the ToolTalk API.
Each procid has its own associated file descriptor, and can join another
session. To switch to another procid, the application should call
tt_default_procid_set.
SEE ALSO
Tt/tt_c.h5, tt_fd3, tt_default_procid3, tt_default_procid_set3,
tt_default_session3, tt_default_session_set3, tt_ptr_error3, tt_free3.