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
11

NAME

13       posix_spawnattr_destroy, posix_spawnattr_init — destroy and  initialize
14       spawn attributes object (ADVANCED REALTIME)
15

SYNOPSIS

17       #include <spawn.h>
18
19       int posix_spawnattr_destroy(posix_spawnattr_t *attr);
20       int posix_spawnattr_init(posix_spawnattr_t *attr);
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. POSIX.1‐2008 does not  define  comparison  or
39       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       POSIX.1‐2008.   Attributes  not  defined by POSIX.1‐2008, their default
44       values, and the names of the associated functions to get and set  those
45       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       The posix_spawnattr_destroy() function may fail if:
67
68       EINVAL The value specified by attr is invalid.
69
70       The following sections are informative.
71

EXAMPLES

73       None.
74

APPLICATION USAGE

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

RATIONALE

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

FUTURE DIRECTIONS

96       None.
97

SEE ALSO

99       posix_spawn(), posix_spawnattr_getsigdefault(), posix_spawnattr_get‐
100       flags(), posix_spawnattr_getpgroup(), posix_spawnattr_getschedparam(),
101       posix_spawnattr_getschedpolicy(), posix_spawnattr_getsigmask()
102
103       The Base Definitions volume of POSIX.1‐2008, <spawn.h>
104
106       Portions of this text are reprinted and reproduced in  electronic  form
107       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
108       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
109       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
110       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
111       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
112       event of any discrepancy between this version and the original IEEE and
113       The  Open Group Standard, the original IEEE and The Open Group Standard
114       is the referee document. The original Standard can be  obtained  online
115       at http://www.unix.org/online.html .
116
117       Any  typographical  or  formatting  errors that appear in this page are
118       most likely to have been introduced during the conversion of the source
119       files  to  man page format. To report such errors, see https://www.ker
120       nel.org/doc/man-pages/reporting_bugs.html .
121
122
123
124IEEE/The Open Group                  2013          POSIX_SPAWNATTR_DESTROY(3P)
Impressum