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-UX Reference > T

t_close(3)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

t_close() — close a transport endpoint

SYNOPSIS

#include <xti.h> /* for X/OPEN Transport Interface - XTI */ /* or */ #include <tiuser.h> /* for Transport Layer Interface - TLI */ int t_close (fd); int fd;

DESCRIPTION

The t_close() function informs the transport provider that the user is finished with the transport endpoint specified by fd, and frees any local library resources associated with the endpoint. t_close() also closes the file descriptor associated with the transport endpoint.

t_close() should be called from the T_UNBND state (see t_getstate(3)). However, this function does not check state information, so it may be called from any state to close a transport endpoint. If this occurs, the local library resources associated with the endpoint will be freed automatically. close() will also be issued for that file descriptor. The close will be abortive if no other process has that file open and will break any transport connection that may be associated with that endpoint.

Valid States

All - apart from T_UNINIT.

Fork Safety

t_close is not fork-safe.

RETURN VALUE

Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and t_errno is set to indicate the error.

ERRORS

[TBADF]

The specified file descriptor does not refer to a transport endpoint.

[TPROTO]

(XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no suitable XTI (t_errno).

STANDARDS CONFORMANCE

t_close(): SVID2, XPG3, XPG4

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