~ubuntu-branches/ubuntu/precise/manpages-posix/precise

1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
1
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
2 by Francesco Paolo Lovergine
* Alligned to linux main manpages edition.
2
.TH "POSIX_SPAWNATTR_DESTROY" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
3
.\" posix_spawnattr_destroy 
4
.SH NAME
5
posix_spawnattr_destroy, posix_spawnattr_init \- destroy and initialize
6
spawn attributes object (\fBADVANCED
7
REALTIME\fP)
8
.SH SYNOPSIS
9
.LP
10
\fB#include <spawn.h>
11
.br
12
.sp
13
int posix_spawnattr_destroy(posix_spawnattr_t *\fP\fIattr\fP\fB);
14
.br
15
int posix_spawnattr_init(posix_spawnattr_t *\fP\fIattr\fP\fB); \fP
16
\fB
17
.br
18
\fP
19
.SH DESCRIPTION
20
.LP
21
The \fIposix_spawnattr_destroy\fP() function shall destroy a spawn
22
attributes object. A destroyed \fIattr\fP attributes object
23
can be reinitialized using \fIposix_spawnattr_init\fP(); the results
24
of otherwise referencing the object after it has been
25
destroyed are undefined. An implementation may cause \fIposix_spawnattr_destroy\fP()
26
to set the object referenced by \fIattr\fP
27
to an invalid value.
28
.LP
29
The \fIposix_spawnattr_init\fP() function shall initialize a spawn
30
attributes object \fIattr\fP with the default value for all
31
of the individual attributes used by the implementation. Results are
32
undefined if \fIposix_spawnattr_init\fP() is called
33
specifying an already initialized \fIattr\fP attributes object.
34
.LP
35
A spawn attributes object is of type \fBposix_spawnattr_t\fP (defined
36
in \fI<spawn.h>\fP) and is used to specify the inheritance of process
37
attributes across a spawn
38
operation. IEEE\ Std\ 1003.1-2001 does not define comparison or assignment
39
operators for the type
40
\fBposix_spawnattr_t\fP.
41
.LP
42
Each implementation shall document the individual attributes it uses
43
and their default values unless these values are defined by
44
IEEE\ Std\ 1003.1-2001. Attributes not defined by IEEE\ Std\ 1003.1-2001,
45
their default values, and the names of
46
the associated functions to get and set those attribute values are
47
implementation-defined.
48
.LP
49
The resulting spawn attributes object (possibly modified by setting
50
individual attribute values), is used to modify the behavior
51
of \fIposix_spawn\fP() or \fIposix_spawnp\fP(). After a spawn attributes
52
object has been used to spawn a process by a
53
call to a \fIposix_spawn\fP() or \fIposix_spawnp\fP(), any function
54
affecting the attributes object (including destruction)
55
shall not affect any process that has been spawned in this way.
56
.SH RETURN VALUE
57
.LP
58
Upon successful completion, \fIposix_spawnattr_destroy\fP() and \fIposix_spawnattr_init\fP()
59
shall return zero; otherwise, an
60
error number shall be returned to indicate the error.
61
.SH ERRORS
62
.LP
63
The \fIposix_spawnattr_init\fP() function shall fail if:
64
.TP 7
65
.B ENOMEM
66
Insufficient memory exists to initialize the spawn attributes object.
67
.sp
68
.LP
69
The \fIposix_spawnattr_destroy\fP() function may fail if:
70
.TP 7
71
.B EINVAL
72
The value specified by attr is invalid.
73
.sp
74
.LP
75
\fIThe following sections are informative.\fP
76
.SH EXAMPLES
77
.LP
78
None.
79
.SH APPLICATION USAGE
80
.LP
81
These functions are part of the Spawn option and need not be provided
82
on all implementations.
83
.SH RATIONALE
84
.LP
85
The original spawn interface proposed in IEEE\ Std\ 1003.1-2001 defined
86
the attributes that specify the inheritance of
87
process attributes across a spawn operation as a structure. In order
88
to be able to separate optional individual attributes under
89
their appropriate options (that is, the \fIspawn-schedparam\fP and
90
\fIspawn-schedpolicy\fP attributes depending upon the Process
91
Scheduling option), and also for extensibility and consistency with
92
the newer POSIX interfaces, the attributes interface has been
93
changed to an opaque data type. This interface now consists of the
94
type \fBposix_spawnattr_t\fP, representing a spawn attributes
95
object, together with associated functions to initialize or destroy
96
the attributes object, and to set or get each individual
97
attribute. Although the new object-oriented interface is more verbose
98
than the original structure, it is simple to use, more
99
extensible, and easy to implement.
100
.SH FUTURE DIRECTIONS
101
.LP
102
None.
103
.SH SEE ALSO
104
.LP
105
\fIposix_spawn\fP() , \fIposix_spawnattr_getsigdefault\fP() , \fIposix_spawnattr_getflags\fP()
106
, \fIposix_spawnattr_getpgroup\fP() , \fIposix_spawnattr_getschedparam\fP()
107
, \fIposix_spawnattr_getschedpolicy\fP() , \fIposix_spawnattr_getsigmask\fP()
108
, \fIposix_spawnattr_setsigdefault\fP() , \fIposix_spawnattr_setflags\fP()
109
, \fIposix_spawnattr_setpgroup\fP() , \fIposix_spawnattr_setsigmask\fP()
110
, \fIposix_spawnattr_setschedpolicy\fP() , \fIposix_spawnattr_setschedparam\fP()
111
, \fIposix_spawnp\fP() , the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
112
\fI<spawn.h>\fP
113
.SH COPYRIGHT
114
Portions of this text are reprinted and reproduced in electronic form
115
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
116
-- Portable Operating System Interface (POSIX), The Open Group Base
117
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
118
Electrical and Electronics Engineers, Inc and The Open Group. In the
119
event of any discrepancy between this version and the original IEEE and
120
The Open Group Standard, the original IEEE and The Open Group Standard
121
is the referee document. The original Standard can be obtained online at
122
http://www.opengroup.org/unix/online.html .