⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 posix_spawnattr_destroy.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 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-2003 The Open Group, All Rights Reserved --><title>posix_spawnattr_destroy</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="posix_spawnattr_destroy"></a> <a name="tag_03_432"></a><!-- posix_spawnattr_destroy --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright &copy; 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_03_432_01"></a>NAME</h4><blockquote>posix_spawnattr_destroy, posix_spawnattr_init - destroy and initialize spawn attributes object (<b>ADVANCEDREALTIME</b>)</blockquote><h4><a name="tag_03_432_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><div class="box"><code><tt><sup>[<a href="javascript:open_code('SPN')">SPN</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> #include &lt;<a href="../basedefs/spawn.h.html">spawn.h</a>&gt;<br><br> int posix_spawnattr_destroy(posix_spawnattr_t *</tt><i>attr</i><tt>);<br> int posix_spawnattr_init(posix_spawnattr_t *</tt><i>attr</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_432_03"></a>DESCRIPTION</h4><blockquote><p>The <i>posix_spawnattr_destroy</i>() function shall destroy a spawn attributes object. A destroyed <i>attr</i> attributes objectcan be reinitialized using <i>posix_spawnattr_init</i>(); the results of otherwise referencing the object after it has beendestroyed are undefined. An implementation may cause <i>posix_spawnattr_destroy</i>() to set the object referenced by <i>attr</i>to an invalid value.</p><p>The <i>posix_spawnattr_init</i>() function shall initialize a spawn attributes object <i>attr</i> with the default value for allof the individual attributes used by the implementation. Results are undefined if <i>posix_spawnattr_init</i>() is calledspecifying an already initialized <i>attr</i> attributes object.</p><p>A spawn attributes object is of type <b>posix_spawnattr_t</b> (defined in <a href="../basedefs/spawn.h.html"><i>&lt;spawn.h&gt;</i></a>) and is used to specify the inheritance of process attributes across a spawnoperation. IEEE&nbsp;Std&nbsp;1003.1-2001 does not define comparison or assignment operators for the type<b>posix_spawnattr_t</b>.</p><p>Each implementation shall document the individual attributes it uses and their default values unless these values are defined byIEEE&nbsp;Std&nbsp;1003.1-2001. Attributes not defined by IEEE&nbsp;Std&nbsp;1003.1-2001, their default values, and the names ofthe associated functions to get and set those attribute values are implementation-defined.</p><p>The resulting spawn attributes object (possibly modified by setting individual attribute values), is used to modify the behaviorof <a href="../functions/posix_spawn.html"><i>posix_spawn</i>()</a> or <a href="../functions/posix_spawnp.html"><i>posix_spawnp</i>()</a>. After a spawn attributes object has been used to spawn a process by acall to a <a href="../functions/posix_spawn.html"><i>posix_spawn</i>()</a> or <a href="../functions/posix_spawnp.html"><i>posix_spawnp</i>()</a>, any function affecting the attributes object (including destruction)shall not affect any process that has been spawned in this way.</p></blockquote><h4><a name="tag_03_432_04"></a>RETURN VALUE</h4><blockquote><p>Upon successful completion, <i>posix_spawnattr_destroy</i>() and <i>posix_spawnattr_init</i>() shall return zero; otherwise, anerror number shall be returned to indicate the error.</p></blockquote><h4><a name="tag_03_432_05"></a>ERRORS</h4><blockquote><p>The <i>posix_spawnattr_init</i>() function shall fail if:</p><dl compact><dt>[ENOMEM]</dt><dd>Insufficient memory exists to initialize the spawn attributes object.</dd></dl><p>The <i>posix_spawnattr_destroy</i>() function may fail if:</p><dl compact><dt>[EINVAL]</dt><dd>The value specified by attr is invalid.</dd></dl></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_03_432_06"></a>EXAMPLES</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_432_07"></a>APPLICATION USAGE</h4><blockquote><p>These functions are part of the Spawn option and need not be provided on all implementations.</p></blockquote><h4><a name="tag_03_432_08"></a>RATIONALE</h4><blockquote><p>The original spawn interface proposed in IEEE&nbsp;Std&nbsp;1003.1-2001 defined the attributes that specify the inheritance ofprocess attributes across a spawn operation as a structure. In order to be able to separate optional individual attributes undertheir appropriate options (that is, the <i>spawn-schedparam</i> and <i>spawn-schedpolicy</i> attributes depending upon the ProcessScheduling option), and also for extensibility and consistency with the newer POSIX interfaces, the attributes interface has beenchanged to an opaque data type. This interface now consists of the type <b>posix_spawnattr_t</b>, representing a spawn attributesobject, together with associated functions to initialize or destroy the attributes object, and to set or get each individualattribute. Although the new object-oriented interface is more verbose than the original structure, it is simple to use, moreextensible, and easy to implement.</p></blockquote><h4><a name="tag_03_432_09"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_432_10"></a>SEE ALSO</h4><blockquote><p><a href="posix_spawn.html"><i>posix_spawn</i>()</a> , <a href="posix_spawnattr_getsigdefault.html"><i>posix_spawnattr_getsigdefault</i>()</a> , <a href="posix_spawnattr_getflags.html"><i>posix_spawnattr_getflags</i>()</a> , <a href="posix_spawnattr_getpgroup.html"><i>posix_spawnattr_getpgroup</i>()</a> , <a href="posix_spawnattr_getschedparam.html"><i>posix_spawnattr_getschedparam</i>()</a> , <a href="posix_spawnattr_getschedpolicy.html"><i>posix_spawnattr_getschedpolicy</i>()</a> , <a href="posix_spawnattr_getsigmask.html"><i>posix_spawnattr_getsigmask</i>()</a> , <a href="posix_spawnattr_setsigdefault.html"><i>posix_spawnattr_setsigdefault</i>()</a> , <a href="posix_spawnattr_setflags.html"><i>posix_spawnattr_setflags</i>()</a> , <a href="posix_spawnattr_setpgroup.html"><i>posix_spawnattr_setpgroup</i>()</a> , <a href="posix_spawnattr_setsigmask.html"><i>posix_spawnattr_setsigmask</i>()</a> , <a href="posix_spawnattr_setschedpolicy.html"><i>posix_spawnattr_setschedpolicy</i>()</a> , <a href="posix_spawnattr_setschedparam.html"><i>posix_spawnattr_setschedparam</i>()</a> , <a href="posix_spawnp.html"><i>posix_spawnp</i>()</a> , the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/spawn.h.html"><i>&lt;spawn.h&gt;</i></a></p></blockquote><h4><a name="tag_03_432_11"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 6. Derived from IEEE&nbsp;Std&nbsp;1003.1d-1999.</p><p>IEEE PASC Interpretation 1003.1 #106 is applied, noting that the effect of initializing an already initialized spawn attributesoption is undefined.</p></blockquote><div class="box"><em>End of informative text.</em></div><hr><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX &reg; is a registered Trademark of The Open Group.<br>POSIX &reg; 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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -