logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

posix_spawnattr_destroy.3p (5316B)


  1. '\" et
  2. .TH POSIX_SPAWNATTR_DESTROY "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. posix_spawnattr_destroy,
  12. posix_spawnattr_init
  13. \(em destroy and initialize spawn attributes object
  14. (\fBADVANCED REALTIME\fP)
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <spawn.h>
  19. .P
  20. int posix_spawnattr_destroy(posix_spawnattr_t *\fIattr\fP);
  21. int posix_spawnattr_init(posix_spawnattr_t *\fIattr\fP);
  22. .fi
  23. .SH DESCRIPTION
  24. The
  25. \fIposix_spawnattr_destroy\fR()
  26. function shall destroy a spawn attributes object. A destroyed
  27. .IR attr
  28. attributes object can be reinitialized using
  29. \fIposix_spawnattr_init\fR();
  30. the results of otherwise referencing the object after it
  31. has been destroyed are undefined. An implementation may cause
  32. \fIposix_spawnattr_destroy\fR()
  33. to set the object referenced by
  34. .IR attr
  35. to an invalid value.
  36. .P
  37. The
  38. \fIposix_spawnattr_init\fR()
  39. function shall initialize a spawn attributes object
  40. .IR attr
  41. with the default value for all of the individual attributes used by the
  42. implementation. Results are undefined if
  43. \fIposix_spawnattr_init\fR()
  44. is called specifying an already initialized
  45. .IR attr
  46. attributes object.
  47. .P
  48. A spawn attributes object is of type
  49. .BR posix_spawnattr_t
  50. (defined in
  51. .IR <spawn.h> )
  52. and is used to specify the inheritance of process attributes across a
  53. spawn operation. POSIX.1\(hy2008 does not define comparison or assignment
  54. operators for the type
  55. .BR posix_spawnattr_t .
  56. .P
  57. Each implementation shall document the individual attributes it uses
  58. and their default values unless these values are defined by POSIX.1\(hy2008.
  59. Attributes not defined by POSIX.1\(hy2008, their default values, and the names of
  60. the associated functions to get and set those attribute values are
  61. implementation-defined.
  62. .P
  63. The resulting spawn attributes object (possibly modified by setting
  64. individual attribute values), is used to modify the behavior of
  65. \fIposix_spawn\fR()
  66. or
  67. \fIposix_spawnp\fR().
  68. After a spawn attributes object has been used to spawn a process by a
  69. call to a
  70. \fIposix_spawn\fR()
  71. or
  72. \fIposix_spawnp\fR(),
  73. any function affecting the attributes object (including destruction)
  74. shall not affect any process that has been spawned in this way.
  75. .SH "RETURN VALUE"
  76. Upon successful completion,
  77. \fIposix_spawnattr_destroy\fR()
  78. and
  79. \fIposix_spawnattr_init\fR()
  80. shall return zero; otherwise, an error number shall be returned to
  81. indicate the error.
  82. .SH ERRORS
  83. The
  84. \fIposix_spawnattr_init\fR()
  85. function shall fail if:
  86. .TP
  87. .BR ENOMEM
  88. Insufficient memory exists to initialize the spawn attributes object.
  89. .P
  90. The
  91. \fIposix_spawnattr_destroy\fR()
  92. function may fail if:
  93. .TP
  94. .BR EINVAL
  95. The value specified by attr is invalid.
  96. .LP
  97. .IR "The following sections are informative."
  98. .SH EXAMPLES
  99. None.
  100. .SH "APPLICATION USAGE"
  101. These functions are part of the Spawn option and need not be
  102. provided on all implementations.
  103. .SH RATIONALE
  104. The original spawn interface proposed in POSIX.1\(hy2008 defined the attributes
  105. that specify the inheritance of process attributes across a spawn
  106. operation as a structure. In order to be able to separate optional
  107. individual attributes under their appropriate options (that is, the
  108. .IR spawn-schedparam
  109. and
  110. .IR spawn-schedpolicy
  111. attributes depending upon the Process Scheduling option), and also for
  112. extensibility and consistency with the newer POSIX interfaces, the
  113. attributes interface has been changed to an opaque data type. This
  114. interface now consists of the type
  115. .BR posix_spawnattr_t ,
  116. representing a spawn attributes object, together with associated
  117. functions to initialize or destroy the attributes object, and to set or
  118. get each individual attribute. Although the new object-oriented
  119. interface is more verbose than the original structure, it is simple to
  120. use, more extensible, and easy to implement.
  121. .SH "FUTURE DIRECTIONS"
  122. None.
  123. .SH "SEE ALSO"
  124. .ad l
  125. .IR "\fIposix_spawn\fR\^(\|)",
  126. .IR "\fIposix_spawnattr_getsigdefault\fR\^(\|)",
  127. .IR "\fIposix_spawnattr_getflags\fR\^(\|)",
  128. .IR "\fIposix_spawnattr_getpgroup\fR\^(\|)",
  129. .IR "\fIposix_spawnattr_getschedparam\fR\^(\|)",
  130. .IR "\fIposix_spawnattr_getschedpolicy\fR\^(\|)",
  131. .IR "\fIposix_spawnattr_getsigmask\fR\^(\|)"
  132. .ad b
  133. .P
  134. The Base Definitions volume of POSIX.1\(hy2017,
  135. .IR "\fB<spawn.h>\fP"
  136. .\"
  137. .SH COPYRIGHT
  138. Portions of this text are reprinted and reproduced in electronic form
  139. from IEEE Std 1003.1-2017, Standard for Information Technology
  140. -- Portable Operating System Interface (POSIX), The Open Group Base
  141. Specifications Issue 7, 2018 Edition,
  142. Copyright (C) 2018 by the Institute of
  143. Electrical and Electronics Engineers, Inc and The Open Group.
  144. In the event of any discrepancy between this version and the original IEEE and
  145. The Open Group Standard, the original IEEE and The Open Group Standard
  146. is the referee document. The original Standard can be obtained online at
  147. http://www.opengroup.org/unix/online.html .
  148. .PP
  149. Any typographical or formatting errors that appear
  150. in this page are most likely
  151. to have been introduced during the conversion of the source files to
  152. man page format. To report such errors, see
  153. https://www.kernel.org/doc/man-pages/reporting_bugs.html .