1POSIX_SPAWNATTR_DESTROY(3P)POSIX Programmer's ManualPOSIX_SPAWNATTR_DESTROY(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       posix_spawnattr_destroy, posix_spawnattr_init - destroy and  initialize
13       spawn attributes object (ADVANCED REALTIME)
14

SYNOPSIS

16       #include <spawn.h>
17
18       int posix_spawnattr_destroy(posix_spawnattr_t *attr);
19       int posix_spawnattr_init(posix_spawnattr_t *attr);
20
21

DESCRIPTION

23       The posix_spawnattr_destroy() function shall destroy a spawn attributes
24       object. A destroyed attr attributes object can be  reinitialized  using
25       posix_spawnattr_init(); the results of otherwise referencing the object
26       after it has been destroyed are undefined. An implementation may  cause
27       posix_spawnattr_destroy()  to  set  the object referenced by attr to an
28       invalid value.
29
30       The posix_spawnattr_init() function shall initialize a spawn attributes
31       object attr with the default value for all of the individual attributes
32       used by  the  implementation.  Results  are  undefined  if  posix_spaw‐
33       nattr_init()   is   called   specifying  an  already  initialized  attr
34       attributes object.
35
36       A spawn attributes object is  of  type  posix_spawnattr_t  (defined  in
37       <spawn.h>) and is used to specify the inheritance of process attributes
38       across a spawn operation. IEEE Std 1003.1-2001 does not define compari‐
39       son or assignment operators for the type posix_spawnattr_t.
40
41       Each  implementation  shall  document the individual attributes it uses
42       and  their  default  values  unless  these  values   are   defined   by
43       IEEE Std 1003.1-2001.  Attributes  not defined by IEEE Std 1003.1-2001,
44       their default values, and the names of the associated functions to  get
45       and set those attribute values are implementation-defined.
46
47       The  resulting  spawn  attributes  object (possibly modified by setting
48       individual attribute  values),  is  used  to  modify  the  behavior  of
49       posix_spawn()  or  posix_spawnp().  After a spawn attributes object has
50       been used  to  spawn  a  process  by  a  call  to  a  posix_spawn()  or
51       posix_spawnp(), any function affecting the attributes object (including
52       destruction) shall not affect any process that has been spawned in this
53       way.
54

RETURN VALUE

56       Upon  successful  completion, posix_spawnattr_destroy() and posix_spaw‐
57       nattr_init() shall return zero; otherwise, an  error  number  shall  be
58       returned to indicate the error.
59

ERRORS

61       The posix_spawnattr_init() function shall fail if:
62
63       ENOMEM Insufficient  memory  exists  to initialize the spawn attributes
64              object.
65
66
67       The posix_spawnattr_destroy() function may fail if:
68
69       EINVAL The value specified by attr is invalid.
70
71
72       The following sections are informative.
73

EXAMPLES

75       None.
76

APPLICATION USAGE

78       These functions are part of the Spawn option and need not  be  provided
79       on all implementations.
80

RATIONALE

82       The  original  spawn interface proposed in IEEE Std 1003.1-2001 defined
83       the attributes that  specify  the  inheritance  of  process  attributes
84       across  a  spawn operation as a structure. In order to be able to sepa‐
85       rate optional individual attributes  under  their  appropriate  options
86       (that is, the spawn-schedparam and spawn-schedpolicy attributes depend‐
87       ing upon the Process Scheduling option), and also for extensibility and
88       consistency  with  the newer POSIX interfaces, the attributes interface
89       has been changed to an opaque data type. This interface now consists of
90       the  type  posix_spawnattr_t,  representing  a spawn attributes object,
91       together  with  associated  functions  to  initialize  or  destroy  the
92       attributes  object,  and  to  set  or  get  each  individual attribute.
93       Although the new object-oriented interface is  more  verbose  than  the
94       original  structure,  it is simple to use, more extensible, and easy to
95       implement.
96

FUTURE DIRECTIONS

98       None.
99

SEE ALSO

101       posix_spawn(),  posix_spawnattr_getsigdefault(),   posix_spawnattr_get‐
102       flags(),  posix_spawnattr_getpgroup(), posix_spawnattr_getschedparam(),
103       posix_spawnattr_getschedpolicy(),         posix_spawnattr_getsigmask(),
104       posix_spawnattr_setsigdefault(),            posix_spawnattr_setflags(),
105       posix_spawnattr_setpgroup(), posix_spawnattr_setsigmask(),  posix_spaw‐
106       nattr_setschedpolicy(),                posix_spawnattr_setschedparam(),
107       posix_spawnp(), the Base Definitions  volume  of  IEEE Std 1003.1-2001,
108       <spawn.h>
109
111       Portions  of  this text are reprinted and reproduced in electronic form
112       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
113       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
114       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
115       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
116       event of any discrepancy between this version and the original IEEE and
117       The  Open Group Standard, the original IEEE and The Open Group Standard
118       is the referee document. The original Standard can be  obtained  online
119       at http://www.opengroup.org/unix/online.html .
120
121
122
123IEEE/The Open Group                  2003          POSIX_SPAWNATTR_DESTROY(3P)
Impressum