trc_close Subroutine

Purpose

Closes and frees a trace log object.

Library

libtrace.a

Syntax

#include <sys/libtrace.h>

int trc_close (handle)
trc_log_handle_t handle;

Description

The trc_close subroutine closes a trace log object. The object must have been opened with the trc_open subroutine. If the TRC_RETAIN_HANDLE type was specified at open time, the trc_close subroutine must be called after a call to the trc_open subroutine, regardless of whether the open succeeded or not.

Parameters

Item Description
handle Contains the handle returned from a successful call to the trc_open subroutine.

Return Values

Upon successful completion, the trc_close subroutine returns a 0.

Error Codes

Upon error, the trc_close subroutine sets the errno global variable and returrns the error from the fclose subroutine. In addition, EINVAL is returned if handle contains an invalid trc_log_handle_t object.