PURPOSE

tpterm - routine for leaving an application

SYNOPSIS


#include <atmi.h>
int tpterm(void)		

DESCRIPTION

tpterm() removes a client from a System/T application. If the client is in transaction mode, then the transaction is rolled back. When tpterm() returns successfully, the caller can no longer communicate with any other program nor can it participate in any transactions. Any outstanding conversations are immediately disconnected.

If tpterm() is called more than once (that is, after the caller has already left the application), no action is taken and success is returned.

RETURN VALUES

tpterm() returns -1 on error and sets tperrno to indicate the error condition.

ERRORS

Under the following conditions, tpterm() fails and sets tperrno to:

[TPEPROTO]
tpterm() was called in an improper context (for example, the caller is a server).
[TPESYSTEM]
A System/T error has occurred. The exact nature of the error is written to a log file.
[TPEOS]
An operating system error has occurred.

SEE ALSO

tpinit(3c)