POSIX_TRACE_ATTR_GETINHERITED(3P) | POSIX Programmer's Manual | POSIX_TRACE_ATTR_GETINHERITED(3P) |
PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.NAME
posix_trace_attr_getinherited, posix_trace_attr_getlogfullpolicy, posix_trace_attr_getstreamfullpolicy, posix_trace_attr_setinherited, posix_trace_attr_setlogfullpolicy, posix_trace_attr_setstreamfullpolicy - retrieve and set the behavior of a trace stream ( TRACING)SYNOPSIS
#include <trace.h>int posix_trace_attr_getinherited(const trace_attr_t *restrict attr,
int *restrict inheritancepolicy);
int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict attr,
int *restrict logpolicy);
int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *attr,
int * streampolicy);
int posix_trace_attr_setinherited(trace_attr_t *attr,
int inheritancepolicy);
int posix_trace_attr_setlogfullpolicy(trace_attr_t *attr,
int logpolicy);
int posix_trace_attr_setstreamfullpolicy(trace_attr_t *attr,
int streampolicy);
DESCRIPTION
The posix_trace_attr_getinherited() and posix_trace_attr_setinherited() functions, respectively, shall get and set the inheritance policy stored in the inheritance attribute for traced processes across the fork() and spawn() operations. The inheritance attribute of the attributes object pointed to by the attr argument shall be set to one of the following values defined by manifest constants in the <trace.h> header:- POSIX_TRACE_CLOSE_FOR_CHILD
-
- POSIX_TRACE_INHERITED
-
The default value for the inheritance attribute is POSIX_TRACE_CLOSE_FOR_CHILD.
The posix_trace_attr_getlogfullpolicy() and posix_trace_attr_setlogfullpolicy() functions, respectively, shall get and set the trace log full policy stored in the log-full-policy attribute of the attributes object pointed to by the attr argument.
The log-full-policy attribute shall be set to one of the following values defined by manifest constants in the <trace.h> header:
- POSIX_TRACE_LOOP
-
- POSIX_TRACE_UNTIL_FULL
-
- POSIX_TRACE_APPEND
-
The default value for the log-full-policy attribute is POSIX_TRACE_LOOP.
The posix_trace_attr_getstreamfullpolicy() and posix_trace_attr_setstreamfullpolicy() functions, respectively, shall get and set the trace stream full policy stored in the stream-full-policy attribute of the attributes object pointed to by the attr argument.
The stream-full-policy attribute shall be set to one of the following values defined by manifest constants in the <trace.h> header:
- POSIX_TRACE_LOOP
-
- POSIX_TRACE_UNTIL_FULL
-
- POSIX_TRACE_FLUSH
-
The default value for the stream-full-policy attribute shall be POSIX_TRACE_LOOP for an active trace stream without log.
If the Trace Log option is supported, the default value for the stream-full-policy attribute shall be POSIX_TRACE_FLUSH for an active trace stream with log.
RETURN VALUE
Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error number.If successful, the posix_trace_attr_getinherited() function shall store the inheritance attribute value in the object pointed to by inheritancepolicy. Otherwise, the content of this object is undefined.
If successful, the posix_trace_attr_getlogfullpolicy() function shall store the log-full-policy attribute value in the object pointed to by logpolicy. Otherwise, the content of this object is undefined.
If successful, the posix_trace_attr_getstreamfullpolicy() function shall store the stream-full-policy attribute value in the object pointed to by streampolicy. Otherwise, the content of this object is undefined.
ERRORS
These functions may fail if:- EINVAL
-
The value specified by at least one of the arguments is invalid.
The following sections are informative.
EXAMPLES
None.APPLICATION USAGE
None.RATIONALE
None.FUTURE DIRECTIONS
None.SEE ALSO
fork(), posix_trace_attr_init(), posix_trace_create(), posix_trace_flush(), posix_trace_get_attr(), posix_trace_getnext_event(), posix_trace_start(), posix_trace_timedgetnext_event(), the Base Definitions volume of IEEE Std 1003.1-2001, <trace.h>COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 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 .2003 | IEEE/The Open Group |