D7net Mini Sh3LL v1
Current File : //usr/share/systemd/../doc/language-selector-common/../libapr1-dev/html/group___pool_cleanup.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Apache Portable Runtime: Pool Cleanup Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Apache Portable Runtime
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Pool Cleanup Functions<div class="ingroups"><a class="el" href="group___a_p_r.html">Apache Portability Runtime library</a> » <a class="el" href="group__apr__pools.html">Memory Pool Functions</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Cleanups are performed in the reverse order they were registered. That is: Last In, First Out. A cleanup function can safely allocate memory from the pool that is being cleaned up. It can also safely register additional cleanups which will be run LIFO, directly after the current cleanup terminates. Cleanups have to take caution in calling functions that create subpools. Subpools, created during cleanup will NOT automatically be cleaned up. In other words, cleanups are to clean up after themselves.
<a href="#details">More...</a></p>
<div class="dynheader">
Collaboration diagram for Pool Cleanup Functions:</div>
<div class="dyncontent">
<div class="center"><img src="group___pool_cleanup.png" border="0" usemap="#group______pool__cleanup" alt=""/></div>
<!-- MAP 0 -->
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga6bdb28224dfe08160cbe3ba6b22dcbd7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___pool_cleanup.html#ga6bdb28224dfe08160cbe3ba6b22dcbd7">apr_pool_cleanup_register</a> (<a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *p, const void *data, <a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*plain_cleanup)(void *), <a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*child_cleanup)(void *))</td></tr>
<tr class="separator:ga6bdb28224dfe08160cbe3ba6b22dcbd7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga64114542989d8872c7fd3c62f2a68678"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___pool_cleanup.html#ga64114542989d8872c7fd3c62f2a68678">apr_pool_pre_cleanup_register</a> (<a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *p, const void *data, <a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*plain_cleanup)(void *))</td></tr>
<tr class="separator:ga64114542989d8872c7fd3c62f2a68678"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gadc59bf32a0302e34fa0a2663f6e48a44"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___pool_cleanup.html#gadc59bf32a0302e34fa0a2663f6e48a44">apr_pool_cleanup_kill</a> (<a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *p, const void *data, <a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*cleanup)(void *))</td></tr>
<tr class="separator:gadc59bf32a0302e34fa0a2663f6e48a44"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7197fa6b43d9c5e99de17e0e900989ea"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___pool_cleanup.html#ga7197fa6b43d9c5e99de17e0e900989ea">apr_pool_child_cleanup_set</a> (<a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *p, const void *data, <a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*plain_cleanup)(void *), <a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*child_cleanup)(void *))</td></tr>
<tr class="separator:ga7197fa6b43d9c5e99de17e0e900989ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gabf3913823af6015895a726ab738eaac5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___pool_cleanup.html#gabf3913823af6015895a726ab738eaac5">apr_pool_cleanup_run</a> (<a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *p, void *data, <a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*cleanup)(void *))</td></tr>
<tr class="separator:gabf3913823af6015895a726ab738eaac5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa211acee585df08f396a50b0ea489b02"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group___pool_cleanup.html#gaa211acee585df08f396a50b0ea489b02">apr_pool_cleanup_null</a> (void *data)</td></tr>
<tr class="separator:gaa211acee585df08f396a50b0ea489b02"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga1726cc585bda8997fcb0828f884be55b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group___pool_cleanup.html#ga1726cc585bda8997fcb0828f884be55b">apr_pool_cleanup_for_exec</a> (void)</td></tr>
<tr class="separator:ga1726cc585bda8997fcb0828f884be55b"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Cleanups are performed in the reverse order they were registered. That is: Last In, First Out. A cleanup function can safely allocate memory from the pool that is being cleaned up. It can also safely register additional cleanups which will be run LIFO, directly after the current cleanup terminates. Cleanups have to take caution in calling functions that create subpools. Subpools, created during cleanup will NOT automatically be cleaned up. In other words, cleanups are to clean up after themselves. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7197fa6b43d9c5e99de17e0e900989ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7197fa6b43d9c5e99de17e0e900989ea">◆ </a></span>apr_pool_child_cleanup_set()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void apr_pool_child_cleanup_set </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*)(void *) </td>
<td class="paramname"><em>plain_cleanup</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*)(void *) </td>
<td class="paramname"><em>child_cleanup</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Replace the child cleanup function of a previously registered cleanup.</p>
<p>The cleanup most recently registered with <em>p</em> having the same values of <em>data</em> and <em>plain_cleanup</em> will have the registered child cleanup function replaced with <em>child_cleanup</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>The pool of the registered cleanup </td></tr>
<tr><td class="paramname">data</td><td>The data of the registered cleanup </td></tr>
<tr><td class="paramname">plain_cleanup</td><td>The plain cleanup function of the registered cleanup </td></tr>
<tr><td class="paramname">child_cleanup</td><td>The function to register as the child cleanup </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga1726cc585bda8997fcb0828f884be55b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1726cc585bda8997fcb0828f884be55b">◆ </a></span>apr_pool_cleanup_for_exec()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void apr_pool_cleanup_for_exec </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Run all registered child cleanups, in preparation for an exec() call in a forked child – close files, etc., but <em>don't</em> flush I/O buffers, <em>don't</em> wait for subprocesses, and <em>don't</em> free any memory. </p>
</div>
</div>
<a id="gadc59bf32a0302e34fa0a2663f6e48a44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadc59bf32a0302e34fa0a2663f6e48a44">◆ </a></span>apr_pool_cleanup_kill()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void apr_pool_cleanup_kill </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*)(void *) </td>
<td class="paramname"><em>cleanup</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove a previously registered cleanup function.</p>
<p>The cleanup most recently registered with <em>p</em> having the same values of <em>data</em> and <em>cleanup</em> will be removed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>The pool to remove the cleanup from </td></tr>
<tr><td class="paramname">data</td><td>The data of the registered cleanup </td></tr>
<tr><td class="paramname">cleanup</td><td>The function to remove from cleanup </td></tr>
</table>
</dd>
</dl>
<dl class="section remark"><dt>Remarks</dt><dd>For some strange reason only the plain_cleanup is handled by this function </dd></dl>
</div>
</div>
<a id="gaa211acee585df08f396a50b0ea489b02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa211acee585df08f396a50b0ea489b02">◆ </a></span>apr_pool_cleanup_null()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_pool_cleanup_null </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>An empty cleanup function.</p>
<p>Passed to <a class="el" href="group___pool_cleanup.html#ga6bdb28224dfe08160cbe3ba6b22dcbd7">apr_pool_cleanup_register()</a> when no cleanup is required.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>The data to cleanup, will not be used by this function. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga6bdb28224dfe08160cbe3ba6b22dcbd7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6bdb28224dfe08160cbe3ba6b22dcbd7">◆ </a></span>apr_pool_cleanup_register()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void apr_pool_cleanup_register </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*)(void *) </td>
<td class="paramname"><em>plain_cleanup</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*)(void *) </td>
<td class="paramname"><em>child_cleanup</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Register a function to be called when a pool is cleared or destroyed </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>The pool to register the cleanup with </td></tr>
<tr><td class="paramname">data</td><td>The data to pass to the cleanup function. </td></tr>
<tr><td class="paramname">plain_cleanup</td><td>The function to call when the pool is cleared or destroyed </td></tr>
<tr><td class="paramname">child_cleanup</td><td>The function to call when a child process is about to exec - this function is called in the child, obviously! </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="gabf3913823af6015895a726ab738eaac5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabf3913823af6015895a726ab738eaac5">◆ </a></span>apr_pool_cleanup_run()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apr_pool_cleanup_run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*)(void *) </td>
<td class="paramname"><em>cleanup</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Run the specified cleanup function immediately and unregister it.</p>
<p>The cleanup most recently registered with <em>p</em> having the same values of <em>data</em> and <em>cleanup</em> will be removed and <em>cleanup</em> will be called with <em>data</em> as the argument.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>The pool to remove the cleanup from </td></tr>
<tr><td class="paramname">data</td><td>The data to remove from cleanup </td></tr>
<tr><td class="paramname">cleanup</td><td>The function to remove from cleanup </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ga64114542989d8872c7fd3c62f2a68678"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga64114542989d8872c7fd3c62f2a68678">◆ </a></span>apr_pool_pre_cleanup_register()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void apr_pool_pre_cleanup_register </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__apr__pools.html#gaf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__apr__errno.html#gaf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a>(*)(void *) </td>
<td class="paramname"><em>plain_cleanup</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Register a function to be called when a pool is cleared or destroyed.</p>
<p>Unlike apr_pool_cleanup_register which registers a cleanup that is called AFTER all subpools are destroyed, this function registers a function that will be called before any of the subpools are destroyed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>The pool to register the cleanup with </td></tr>
<tr><td class="paramname">data</td><td>The data to pass to the cleanup function. </td></tr>
<tr><td class="paramname">plain_cleanup</td><td>The function to call when the pool is cleared or destroyed </td></tr>
</table>
</dd>
</dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
AnonSec - 2021 | Recode By D7net