POSIX_SPAWNATTR_DESTROY(3) POSIX Programmer's ManualPOSIX_SPAWNATTR_DESTROY(3)



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

NNAAMMEE
       posix_spawnattr_destroy, posix_spawnattr_init -- destroy and initialize
       spawn attributes object (AADDVVAANNCCEEDD RREEAALLTTIIMMEE)

SSYYNNOOPPSSIISS
       #include <spawn.h>

       int posix_spawnattr_destroy(posix_spawnattr_t *_a_t_t_r);
       int posix_spawnattr_init(posix_spawnattr_t *_a_t_t_r);

DDEESSCCRRIIPPTTIIOONN
       The _p_o_s_i_x___s_p_a_w_n_a_t_t_r___d_e_s_t_r_o_y() function shall destroy a spawn attributes
       object. A destroyed _a_t_t_r attributes object can be reinitialized using
       _p_o_s_i_x___s_p_a_w_n_a_t_t_r___i_n_i_t(); the results of otherwise referencing the object
       after it has been destroyed are undefined. An implementation may cause
       _p_o_s_i_x___s_p_a_w_n_a_t_t_r___d_e_s_t_r_o_y() to set the object referenced by _a_t_t_r to an
       invalid value.

       The _p_o_s_i_x___s_p_a_w_n_a_t_t_r___i_n_i_t() function shall initialize a spawn attributes
       object _a_t_t_r with the default value for all of the individual attributes
       used by the implementation. Results are undefined if
       _p_o_s_i_x___s_p_a_w_n_a_t_t_r___i_n_i_t() is called specifying an already initialized _a_t_t_r
       attributes object.

       A spawn attributes object is of type ppoossiixx__ssppaawwnnaattttrr__tt (defined in
       _<_s_p_a_w_n_._h_>) and is used to specify the inheritance of process attributes
       across a spawn operation. POSIX.1-2008 does not define comparison or
       assignment operators for the type ppoossiixx__ssppaawwnnaattttrr__tt.

       Each implementation shall document the individual attributes it uses
       and their default values unless these values are defined by
       POSIX.1-2008.  Attributes not defined by POSIX.1-2008, their default
       values, and the names of the associated functions to get and set those
       attribute values are implementation-defined.

       The resulting spawn attributes object (possibly modified by setting
       individual attribute values), is used to modify the behavior of
       _p_o_s_i_x___s_p_a_w_n() or _p_o_s_i_x___s_p_a_w_n_p().  After a spawn attributes object has
       been used to spawn a process by a call to a _p_o_s_i_x___s_p_a_w_n() or
       _p_o_s_i_x___s_p_a_w_n_p(), any function affecting the attributes object (including
       destruction) shall not affect any process that has been spawned in this
       way.

RREETTUURRNN VVAALLUUEE
       Upon successful completion, _p_o_s_i_x___s_p_a_w_n_a_t_t_r___d_e_s_t_r_o_y() and
       _p_o_s_i_x___s_p_a_w_n_a_t_t_r___i_n_i_t() shall return zero; otherwise, an error number
       shall be returned to indicate the error.

EERRRROORRSS
       The _p_o_s_i_x___s_p_a_w_n_a_t_t_r___i_n_i_t() function shall fail if:

       EENNOOMMEEMM Insufficient memory exists to initialize the spawn attributes
              object.

       The _p_o_s_i_x___s_p_a_w_n_a_t_t_r___d_e_s_t_r_o_y() function may fail if:

       EEIINNVVAALL The value specified by attr is invalid.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       These functions are part of the Spawn option and need not be provided
       on all implementations.

RRAATTIIOONNAALLEE
       The original spawn interface proposed in POSIX.1-2008 defined the
       attributes that specify the inheritance of process attributes across a
       spawn operation as a structure. In order to be able to separate
       optional individual attributes under their appropriate options (that
       is, the _s_p_a_w_n_-_s_c_h_e_d_p_a_r_a_m and _s_p_a_w_n_-_s_c_h_e_d_p_o_l_i_c_y attributes depending
       upon the Process Scheduling option), and also for extensibility and
       consistency with the newer POSIX interfaces, the attributes interface
       has been changed to an opaque data type. This interface now consists of
       the type ppoossiixx__ssppaawwnnaattttrr__tt, representing a spawn attributes object,
       together with associated functions to initialize or destroy the
       attributes object, and to set or get each individual attribute.
       Although the new object-oriented interface is more verbose than the
       original structure, it is simple to use, more extensible, and easy to
       implement.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _p_o_s_i_x___s_p_a_w_n(), _p_o_s_i_x___s_p_a_w_n_a_t_t_r___g_e_t_s_i_g_d_e_f_a_u_l_t(),
       _p_o_s_i_x___s_p_a_w_n_a_t_t_r___g_e_t_f_l_a_g_s(), _p_o_s_i_x___s_p_a_w_n_a_t_t_r___g_e_t_p_g_r_o_u_p(),
       _p_o_s_i_x___s_p_a_w_n_a_t_t_r___g_e_t_s_c_h_e_d_p_a_r_a_m(), _p_o_s_i_x___s_p_a_w_n_a_t_t_r___g_e_t_s_c_h_e_d_p_o_l_i_c_y(),
       _p_o_s_i_x___s_p_a_w_n_a_t_t_r___g_e_t_s_i_g_m_a_s_k()

       The Base Definitions volume of POSIX.1-2017, <<ssppaawwnn..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017           POSIX_SPAWNATTR_DESTROY(3)
