| POSIX_SPAWNATTR_SETFLAGS(3) | Library Functions Manual | POSIX_SPAWNATTR_SETFLAGS(3) | 
posix_spawnattr_setflags
    posix_spawnattr_getflags —
    get or set flags on a
    posix_spawnattr_t
#include
  <spawn.h>
int
  
  posix_spawnattr_setflags(posix_spawnattr_t
    *attr, short flags);
int
  
  posix_spawnattr_getflags(const
    posix_spawnattr_t *restrict attr, short *restrict
    flags);
The
    posix_spawnattr_setflags()
    function sets the flags on the attributes object
    referenced by attr.
The
    posix_spawnattr_getflags()
    function retrieves the flags on the attributes object
    referenced by attr.
The argument flags is either 0 or a bitwise OR of one or more of the following flags:
POSIX_SPAWN_RESETIDSPOSIX_SPAWN_SETPGROUPPOSIX_SPAWN_SETSIGDEFPOSIX_SPAWN_SETSIGMASKPOSIX_SPAWN_SETEXECPOSIX_SPAWN_START_SUSPENDEDSIGSTOP
      signal, permitting debuggers, profilers, and other programs to manipulate
      the process before it begins execution in user space. This permits, for
      example, obtaining exact instruction counts, or debugging very early in
      dyld(1). To resume the child process,
      it must be sent a SIGCONT signal.POSIX_SPAWN_CLOEXEC_DEFAULTOn success, these functions return 0; on failure they return an
    error number from <errno.h>.
    The posix_spawnattr_getflags() function
    additionally, upon successful completion, makes the value pointed to by the
    flags argument equal to the
    spawn-flags
    attribute of the posix_spawnattr_t.
These functions may fail if:
posix_spawn(2), posix_spawnp(2), posix_spawnattr_init(3), posix_spawnattr_destroy(3), posix_spawnattr_setpgroup(3), posix_spawnattr_setsigdefault(3), posix_spawnattr_setsigmask(3), posix_spawn_file_actions_init(3), setpgid(2), signal(3), execve(2), dyld(1)
Version 3 of the Single UNIX Specification (“SUSv3”) [SPN]
The posix_spawnattr_setflags() and
    posix_spawnattr_getflags() function calls appeared
    in Version 3 of the Single UNIX Specification
    (“SUSv3”) [SPN].
| October 28, 2010 | Mac OS X |