Manual Pages for UNIX Darwin command on man posix_spawnattr_getflags
MyWebUniversity

Manual Pages for UNIX Darwin command on man posix_spawnattr_getflags

POSIXSPAWNATTRSETFL... BSD Library Functions Manual POSIXSPAWNATTRSETFL...

NAME

ppoossiixxssppaawwnnaattttrrsseettffllaaggss ppoossiixxssppaawwnnaattttrrggeettffllaaggss - get or set flags on

a posixspawnattrt

SYNOPSIS

##iinncclluuddee <>

int ppoossiixxssppaawwnnaattttrrsseettffllaaggss(posixspawnattrt *attr, short flags); int ppoossiixxssppaawwnnaattttrrggeettffllaaggss(const posixspawnattrt *restrict attr, short *restrict flags);

DESCRIPTION

The ppoossiixxssppaawwnnaattttrrsseettffllaaggss() function sets the flags on the attributes object referenced by attr. The ppoossiixxssppaawwnnaattttrrggeettffllaaggss() function retrieves the flags on the attributes object referenced by attr.

The argument flags is either 0 or a logical OR of one or more of the fol-

lowing flags: POSIXSPAWNRESETIDS If the set group bit is set on the process image being spawned, this bit has no effect; otherwise, if not set, the child process will inherit the effective group ID of the parent process, and if set, the child process will inherit the real group ID of the parent process. POSIXSPAWNSETPGROUP If this bit is not set, then the child process inherits the parent process group; if set, then the child process shall behave as if the setpgid(2) function had been called with a pid parameter of 0 and a pgid

parameter equal to the value of the spawn-

pgroup value of the posixspawnattrt, as set by posixspawnattrsetpgroup(3) POSIXSPAWNSETSIGDEF Signals set to to either be caught or to the default action in the parent process will also be set to the default action in the child process. Signals set to be ignored in the parent process will be ignored in the child. However, if this bit is set, then

signals in the spawn-sigdefault value of the

posixspawnattrt, as set by posixspawnattrsetsigdefault(3) which are caught or ignored in the parent will instead be reset to their default actions in the child. POSIXSPAWNSETSIGMASK If this bit is set, then the initial signal mask of the child process will be set to the

spawn-sigmask value of the

posixspawnattrt, as set by posixspawnattrsetsigmask(3). POSIXSPAWNSETEXEC Apple Extension: If this bit is set, rather than returning to the caller, posixspawn(2) and posixspawnp(2) will behave as a more featureful execve(2). POSIXSPAWNSTARTSUSPENDED Apple Extension: If this bit is set, then the child process will be created with its

task suspended, permitting debuggers, pro-

filers, 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).

RETURN VALUES

On success, these functions return 0; on failure they return an error number from . The ppoossiixxssppaawwnnaattttrrggeettffllaaggss() additionally, upon successful completion, modifies the value pointed to be the attr argument

by making it equal to the spawn-flags attribute of the posixspawnattrt.

EERRRROORRSS These functions may fail if: [EINVAL] The value specified by attr is invalid. [EINVAL] The value of attr is invalid.

SEE ALSO

posixspawn(2), posixspawnp(2), posixspawnattrinit(3), posixspawnattrdestroy(3), posixspawnattrsetpgroup(3), posixspawnattrsetsigdefault(3), posixspawnattrsetsigmask(3), setpgid(2), execve(2), dyld(1) STANDARDS Version 3 of the Single UNIX Specification (``SUSv3'') [SPN] HISTORY The ppoossiixxssppaawwnnaattttrrsseettffllaaggss() and ppoossiixxssppaawwnnaattttrrggeettffllaaggss() function calls appeared in Version 3 of the Single UNIX Specification (``SUSv3'') [SPN]. Mac OS X August 22, 2007 Mac OS X




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™