272 lines
14 KiB
HTML
272 lines
14 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>posix_trace_attr_getinherited</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="posix_trace_attr_getinherited"></a> <a name="tag_03_449"></a><!-- posix_trace_attr_getinherited -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_03_449_01"></a>NAME</h4>
|
|
|
|
<blockquote>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 (<b>TRACING</b>)</blockquote>
|
|
|
|
<h4><a name="tag_03_449_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> #include <<a href="../basedefs/trace.h.html">trace.h</a>><br>
|
|
<br>
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TRI')">TRC TRI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> int posix_trace_attr_getinherited(const trace_attr_t *restrict</tt> <i>attr</i><tt>,<br>
|
|
int *restrict</tt> <i>inheritancepolicy</i><tt>);<br>
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TRL')">TRC TRL</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> int posix_trace_attr_getlogfullpolicy(const trace_attr_t *restrict</tt> <i>attr</i><tt>,<br>
|
|
int *restrict</tt> <i>logpolicy</i><tt>);<br>
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> int posix_trace_attr_getstreamfullpolicy(const trace_attr_t *</tt><i>attr</i><tt>,<br>
|
|
int *</tt><i>streampolicy</i><tt>);<br>
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TRI')">TRC TRI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> int posix_trace_attr_setinherited(trace_attr_t *</tt><i>attr</i><tt>,<br>
|
|
int</tt> <i>inheritancepolicy</i><tt>);<br>
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC TRL')">TRC TRL</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> int posix_trace_attr_setlogfullpolicy(trace_attr_t *</tt><i>attr</i><tt>,<br>
|
|
int</tt> <i>logpolicy</i><tt>);<br>
|
|
<img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('TRC')">TRC</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> int posix_trace_attr_setstreamfullpolicy(trace_attr_t *</tt><i>attr</i><tt>,<br>
|
|
int</tt> <i>streampolicy</i><tt>); <img src="../images/opt-end.gif" alt="[Option End]"
|
|
border="0"></tt></code></div>
|
|
|
|
<tt><br>
|
|
</tt></blockquote>
|
|
|
|
<h4><a name="tag_03_449_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p><sup>[<a href="javascript:open_code('TRI')">TRI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
The <i>posix_trace_attr_getinherited</i>() and <i>posix_trace_attr_setinherited</i>() functions, respectively, shall get and set
|
|
the inheritance policy stored in the <i>inheritance</i> attribute for traced processes across the <a href=
|
|
"../functions/fork.html"><i>fork</i>()</a> and <i>spawn</i>() operations. The <i>inheritance</i> attribute of the attributes object
|
|
pointed to by the <i>attr</i> argument shall be set to one of the following values defined by manifest constants in the <a href=
|
|
"../basedefs/trace.h.html"><i><trace.h></i></a> header:</p>
|
|
|
|
<dl compact>
|
|
<dt>POSIX_TRACE_CLOSE_FOR_CHILD</dt>
|
|
|
|
<dd><br>
|
|
After a <a href="../functions/fork.html"><i>fork</i>()</a> or <i>spawn</i>() operation, the child shall not be traced, and tracing
|
|
of the parent shall continue.</dd>
|
|
|
|
<dt>POSIX_TRACE_INHERITED</dt>
|
|
|
|
<dd><br>
|
|
After a <a href="../functions/fork.html"><i>fork</i>()</a> or <i>spawn</i>() operation, if the parent is being traced, its child
|
|
shall be concurrently traced using the same trace stream.</dd>
|
|
</dl>
|
|
|
|
<p>The default value for the <i>inheritance</i> attribute is POSIX_TRACE_CLOSE_FOR_CHILD. <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
The <i>posix_trace_attr_getlogfullpolicy</i>() and <i>posix_trace_attr_setlogfullpolicy</i>() functions, respectively, shall get
|
|
and set the trace log full policy stored in the <i>log-full-policy</i> attribute of the attributes object pointed to by the
|
|
<i>attr</i> argument.</p>
|
|
|
|
<p>The <i>log-full-policy</i> attribute shall be set to one of the following values defined by manifest constants in the <a href=
|
|
"../basedefs/trace.h.html"><i><trace.h></i></a> header:</p>
|
|
|
|
<dl compact>
|
|
<dt>POSIX_TRACE_LOOP</dt>
|
|
|
|
<dd><br>
|
|
The trace log shall loop until the associated trace stream is stopped. This policy means that when the trace log gets full, the
|
|
file system shall reuse the resources allocated to the oldest trace events that were recorded. In this way, the trace log will
|
|
always contain the most recent trace events flushed.</dd>
|
|
|
|
<dt>POSIX_TRACE_UNTIL_FULL</dt>
|
|
|
|
<dd><br>
|
|
The trace stream shall be flushed to the trace log until the trace log is full. This condition can be deduced from the
|
|
<i>posix_log_full_status</i> member status (see the <b>posix_trace_status_info</b> structure defined in <a href=
|
|
"../basedefs/trace.h.html"><i><trace.h></i></a>). The last recorded trace event shall be the POSIX_TRACE_STOP trace
|
|
event.</dd>
|
|
|
|
<dt>POSIX_TRACE_APPEND</dt>
|
|
|
|
<dd><br>
|
|
The associated trace stream shall be flushed to the trace log without log size limitation. If the application specifies
|
|
POSIX_TRACE_APPEND, the implementation shall ignore the <i>log-max-size</i> attribute.</dd>
|
|
</dl>
|
|
|
|
<p>The default value for the <i>log-full-policy</i> attribute is POSIX_TRACE_LOOP. <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></p>
|
|
|
|
<p>The <i>posix_trace_attr_getstreamfullpolicy</i>() and <i>posix_trace_attr_setstreamfullpolicy</i>() functions, respectively,
|
|
shall get and set the trace stream full policy stored in the <i>stream-full-policy</i> attribute of the attributes object pointed
|
|
to by the <i>attr</i> argument.</p>
|
|
|
|
<p>The <i>stream-full-policy</i> attribute shall be set to one of the following values defined by manifest constants in the <a
|
|
href="../basedefs/trace.h.html"><i><trace.h></i></a> header:</p>
|
|
|
|
<dl compact>
|
|
<dt>POSIX_TRACE_LOOP</dt>
|
|
|
|
<dd><br>
|
|
The trace stream shall loop until explicitly stopped by the <a href=
|
|
"../functions/posix_trace_stop.html"><i>posix_trace_stop</i>()</a> function. This policy means that when the trace stream is full,
|
|
the trace system shall reuse the resources allocated to the oldest trace events recorded. In this way, the trace stream will always
|
|
contain the most recent trace events recorded.</dd>
|
|
|
|
<dt>POSIX_TRACE_UNTIL_FULL</dt>
|
|
|
|
<dd><br>
|
|
The trace stream will run until the trace stream resources are exhausted. Then the trace stream will stop. This condition can be
|
|
deduced from <i>posix_stream_status</i> and <i>posix_stream_full_status</i> (see the <b>posix_trace_status_info</b> structure
|
|
defined in <a href="../basedefs/trace.h.html"><i><trace.h></i></a>). When this trace stream is read, a POSIX_TRACE_STOP trace
|
|
event shall be reported after reporting the last recorded trace event. The trace system shall reuse the resources allocated to any
|
|
trace events already reported-see the <a href="../functions/posix_trace_getnext_event.html"><i>posix_trace_getnext_event</i>()</a>,
|
|
<a href="../functions/posix_trace_trygetnext_event.html"><i>posix_trace_trygetnext_event</i>()</a>, and <a href=
|
|
"../functions/posix_trace_timedgetnext_event.html"><i>posix_trace_timedgetnext_event</i>()</a> functions-or already flushed for an
|
|
active trace stream with log if the Trace Log option is supported; see the <a href=
|
|
"../functions/posix_trace_flush.html"><i>posix_trace_flush</i>()</a> function. The trace system shall restart the trace stream when
|
|
it is empty and may restart it sooner. A POSIX_TRACE_START trace event shall be reported before reporting the next recorded trace
|
|
event.</dd>
|
|
|
|
<dt>POSIX_TRACE_FLUSH</dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border=
|
|
"0"><br>
|
|
If the Trace Log option is supported, this policy is identical to the POSIX_TRACE_UNTIL_FULL trace stream full policy except that
|
|
the trace stream shall be flushed regularly as if <a href="../functions/posix_trace_flush.html"><i>posix_trace_flush</i>()</a> had
|
|
been explicitly called. Defining this policy for an active trace stream without log shall be invalid. <img src=
|
|
"../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
</dl>
|
|
|
|
<p>The default value for the <i>stream-full-policy</i> attribute shall be POSIX_TRACE_LOOP for an active trace stream without
|
|
log.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
If the Trace Log option is supported, the default value for the <i>stream-full-policy</i> attribute shall be POSIX_TRACE_FLUSH for
|
|
an active trace stream with log. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_449_04"></a>RETURN VALUE</h4>
|
|
|
|
<blockquote>
|
|
<p>Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error
|
|
number.</p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TRI')">TRI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
If successful, the <i>posix_trace_attr_getinherited</i>() function shall store the <i>inheritance</i> attribute value in the object
|
|
pointed to by <i>inheritancepolicy</i>. Otherwise, the content of this object is undefined. <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></p>
|
|
|
|
<p><sup>[<a href="javascript:open_code('TRL')">TRL</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
If successful, the <i>posix_trace_attr_getlogfullpolicy</i>() function shall store the <i>log-full-policy</i> attribute value in
|
|
the object pointed to by <i>logpolicy</i>. Otherwise, the content of this object is undefined. <img src="../images/opt-end.gif"
|
|
alt="[Option End]" border="0"></p>
|
|
|
|
<p>If successful, the <i>posix_trace_attr_getstreamfullpolicy</i>() function shall store the <i>stream-full-policy</i> attribute
|
|
value in the object pointed to by <i>streampolicy</i>. Otherwise, the content of this object is undefined.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_449_05"></a>ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>These functions may fail if:</p>
|
|
|
|
<dl compact>
|
|
<dt>[EINVAL]</dt>
|
|
|
|
<dd>The value specified by at least one of the arguments is invalid.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_03_449_06"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_449_07"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_449_08"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_449_09"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_449_10"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="fork.html"><i>fork</i>()</a> , <a href="posix_trace_attr_init.html"><i>posix_trace_attr_init</i>()</a> , <a href=
|
|
"posix_trace_create.html"><i>posix_trace_create</i>()</a> , <a href="posix_trace_flush.html"><i>posix_trace_flush</i>()</a> , <a
|
|
href="posix_trace_get_attr.html"><i>posix_trace_get_attr</i>()</a> , <a href=
|
|
"posix_trace_getnext_event.html"><i>posix_trace_getnext_event</i>()</a> , <a href=
|
|
"posix_trace_start.html"><i>posix_trace_start</i>()</a> , <a href=
|
|
"posix_trace_timedgetnext_event.html"><i>posix_trace_timedgetnext_event</i>()</a> , the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/trace.h.html"><i><trace.h></i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_449_11"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 6. Derived from IEEE Std 1003.1q-2000.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|