Closes and frees a trace log object.
libtrace.a
#include <sys/libtrace.h>
int trc_close (handle)
trc_log_handle_t handle;
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.
Item | Description |
---|---|
handle | Contains the handle returned from a successful call to the trc_open subroutine. |
Upon successful completion, the trc_close subroutine returns a 0.
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.