1POSIX_TRACE_CLOSE(3P)      POSIX Programmer's Manual     POSIX_TRACE_CLOSE(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       posix_trace_close, posix_trace_open,  posix_trace_rewind  —  trace  log
13       management (TRACING)
14

SYNOPSIS

16       #include <trace.h>
17
18       int posix_trace_close(trace_id_t trid);
19       int posix_trace_open(int file_desc, trace_id_t *trid);
20       int posix_trace_rewind(trace_id_t trid);
21

DESCRIPTION

23       The posix_trace_close() function shall deallocate the trace log identi‐
24       fier indicated by trid, and all of its associated resources.  If  there
25       is no valid trace log pointed to by the trid, this function shall fail.
26
27       The  posix_trace_open() function shall allocate the necessary resources
28       and establish the connection between a  trace  log  identified  by  the
29       file_desc  argument  and  a  trace  stream identifier identified by the
30       object pointed to by the trid argument. The file_desc  argument  should
31       be  a  valid  open file descriptor that corresponds to a trace log. The
32       file_desc argument shall be open for reading. The current  trace  event
33       timestamp,  which  specifies the timestamp of the trace event that will
34       be read by the next call to posix_trace_getnext_event(), shall  be  set
35       to  the  timestamp  of the oldest trace event recorded in the trace log
36       identified by trid.
37
38       The posix_trace_open() function shall return a trace stream  identifier
39       in  the variable pointed to by the trid argument, that may only be used
40       by the following functions:
41
42       posix_trace_close()                      posix_trace_get_attr()
43       posix_trace_eventid_equal()              posix_trace_get_status()
44       posix_trace_eventid_get_name()           posix_trace_getnext_event()
45       posix_trace_eventtypelist_getnext_id()   posix_trace_rewind()
46       posix_trace_eventtypelist_rewind()
47
48       In particular, notice that the operations normally used by a trace con‐
49       troller  process,  such  as posix_trace_start(), posix_trace_stop(), or
50       posix_trace_shutdown(), cannot be invoked using the trace stream  iden‐
51       tifier returned by the posix_trace_open() function.
52
53       The  posix_trace_rewind()  function shall reset the current trace event
54       timestamp, which specifies the timestamp of the trace event  that  will
55       be  read  by the next call to posix_trace_getnext_event(), to the time‐
56       stamp of the oldest trace event recorded in the trace log identified by
57       trid.
58

RETURN VALUE

60       Upon  successful  completion,  these  functions shall return a value of
61       zero. Otherwise, they shall return the corresponding error number.
62
63       If successful, the posix_trace_open() function stores the trace  stream
64       identifier value in the object pointed to by trid.
65

ERRORS

67       The posix_trace_open() function shall fail if:
68
69       EINTR  The  operation was interrupted by a signal and thus no trace log
70              was opened.
71
72       EINVAL The object pointed to by file_desc  does  not  correspond  to  a
73              valid trace log.
74
75       The posix_trace_close() and posix_trace_rewind() functions may fail if:
76
77       EINVAL The  object  pointed  to  by trid does not correspond to a valid
78              trace log.
79
80       The following sections are informative.
81

EXAMPLES

83       None.
84

APPLICATION USAGE

86       None.
87

RATIONALE

89       None.
90

FUTURE DIRECTIONS

92       The posix_trace_close(), posix_trace_open(),  and  posix_trace_rewind()
93       functions may be removed in a future version.
94

SEE ALSO

96       posix_trace_get_attr(), posix_trace_get_filter(), posix_trace_get‐
97       next_event()
98
99       The Base Definitions volume of POSIX.1‐2017, <trace.h>
100
102       Portions of this text are reprinted and reproduced in  electronic  form
103       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
104       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
105       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
106       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
107       event of any discrepancy between this version and the original IEEE and
108       The Open Group Standard, the original IEEE and The Open Group  Standard
109       is  the  referee document. The original Standard can be obtained online
110       at http://www.opengroup.org/unix/online.html .
111
112       Any typographical or formatting errors that appear  in  this  page  are
113       most likely to have been introduced during the conversion of the source
114       files to man page format. To report such errors,  see  https://www.ker
115       nel.org/doc/man-pages/reporting_bugs.html .
116
117
118
119IEEE/The Open Group                  2017                POSIX_TRACE_CLOSE(3P)
Impressum