POSIX_TRACE_CLEAR(3)       POSIX Programmer's Manual      POSIX_TRACE_CLEAR(3)



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

NNAAMMEE
       posix_trace_clear -- clear trace stream and trace log (TTRRAACCIINNGG)

SSYYNNOOPPSSIISS
       #include <sys/types.h>
       #include <trace.h>

       int posix_trace_clear(trace_id_t _t_r_i_d);

DDEESSCCRRIIPPTTIIOONN
       The _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() function shall reinitialize the trace stream
       identified by the argument _t_r_i_d as if it were returning from the
       _p_o_s_i_x___t_r_a_c_e___c_r_e_a_t_e() function, except that the same allocated resources
       shall be reused, the mapping of trace event type identifiers to trace
       event names shall be unchanged, and the trace stream status shall
       remain unchanged (that is, if it was running, it remains running and if
       it was suspended, it remains suspended).

       All trace events in the trace stream recorded before the call to
       _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() shall be lost. The _p_o_s_i_x___s_t_r_e_a_m___f_u_l_l___s_t_a_t_u_s status
       shall be set to POSIX_TRACE_NOT_FULL.  There is no guarantee that all
       trace events that occurred during the _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() call are
       recorded; the behavior with respect to trace points that may occur
       during this call is unspecified.

       If the Trace Log option is supported and the trace stream has been
       created with a log, the _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() function shall reinitialize
       the trace stream with the same behavior as if the trace stream was
       created without the log, plus it shall reinitialize the trace log
       associated with the trace stream identified by the argument _t_r_i_d as if
       it were returning from the _p_o_s_i_x___t_r_a_c_e___c_r_e_a_t_e___w_i_t_h_l_o_g() function,
       except that the same allocated resources, for the trace log, may be
       reused and the associated trace stream status remains unchanged.  The
       first trace event recorded in the trace log after the call to
       _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() shall be the same as the first trace event recorded
       in the active trace stream after the call to _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r().  The
       _p_o_s_i_x___l_o_g___f_u_l_l___s_t_a_t_u_s status shall be set to POSIX_TRACE_NOT_FULL.
       There is no guarantee that all trace events that occurred during the
       _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() call are recorded in the trace log; the behavior
       with respect to trace points that may occur during this call is
       unspecified. If the log full policy is POSIX_TRACE_APPEND, the effect
       of a call to this function is unspecified for the trace log associated
       with the trace stream identified by the _t_r_i_d argument.

RREETTUURRNN VVAALLUUEE
       Upon successful completion, the _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() function shall
       return a value of zero. Otherwise, it shall return the corresponding
       error number.

EERRRROORRSS
       The _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() function shall fail if:

       EEIINNVVAALL The value of the _t_r_i_d argument does not correspond to an active
              trace stream.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       The _p_o_s_i_x___t_r_a_c_e___c_l_e_a_r() function may be removed in a future version.

SSEEEE AALLSSOO
       _p_o_s_i_x___t_r_a_c_e___a_t_t_r___d_e_s_t_r_o_y(), _p_o_s_i_x___t_r_a_c_e___c_r_e_a_t_e(),
       _p_o_s_i_x___t_r_a_c_e___g_e_t___a_t_t_r()

       The Base Definitions volume of POSIX.1-2017, <<ssyyss__ttyyppeess..hh>>, <<ttrraaccee..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                 POSIX_TRACE_CLEAR(3)
