Manual Pages for UNIX Darwin command on man posix_spawnattr_setbinpref_np
MyWebUniversity

Manual Pages for UNIX Darwin command on man posix_spawnattr_setbinpref_np

POSIXSPAWNATTRSETBI... BSD Library Functions Manual POSIXSPAWNATTRSETBI...

NAME

ppoossiixxssppaawwnnaattttrrsseettbbiinnpprreeffnnpp ppoossiixxssppaawwnnaattttrrggeettbbiinnpprreeffnnpp - set or get

the spawn-binpref attribute on a posixspawnattrt

SYNOPSIS

##iinncclluuddee <>

int ppoossiixxssppaawwnnaattttrrsseettbbiinnpprreeffnnpp(posixspawnattrt *restrict attr, sizet count, cputypet *pref, sizet *restrict ocount); int ppoossiixxssppaawwnnaattttrrggeettbbiinnpprreeffnnpp(const posixspawnattrt *restrict attr, sizet count, cputypet *pref, sizet * restrict ocount); IIMMPPOORRTTAANNTT These functions represent an Apple extension to posixspawn(2) and posixspawnp(2), and as such should not be used by programs intending their code to be portable to other platforms.

DESCRIPTION

The ppoossiixxssppaawwnnaattttrrsseettbbiinnpprreeffnnpp() function sets the universal binary preferences for the spawn attribute value referenced by attr from the memory containing the cputypet referenced by pref with a size of count elements; the actual number of elements that are set in the attribute is returned in ocount. When spawn(2) or spawnp(2) is subsequently invoked on a Universal binary with the posixspawnattrt, the elements which were set will be used, in the order they were set, to select the first element in the list which matches any cputypet of those available in the Universal binary. If there is no match, then the attempt to create the child process will fail

with the error EBADARCH. If the cputypet CPUTYPEANY is the last ele-

ment in the list, then rather than returning EBADARCH on no match, the system will instead fall back to the standard Universal binary grading preference order. The ppoossiixxssppaawwnnaattttrrggeettbbiinnpprreeffnnpp() function gets the universal binary preferences for the spawn attribute value referenced by attr into the memory containing the cputypet referenced by pref with a prereserved size of count elements; the actual number of elements that are copied from the attribute is returned in ocount.

RETURN VALUES

On success, these functions return 0; on failure they return an error number from and modify the value of ocount. Additionally, if successful, ppoossiixxssppaawwnnaattttrrggeettbbiinnpprreeffnnpp() will modify the contents of the pref array with the current attribute values. 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), posixspawnattrsetflags(3) STANDARDS Nonstandard HISTORY The ppoossiixxssppaawwnnaattttrrsseettbbiinnpprreeffnnpp() and ppoossiixxssppaawwnnaattttrrggeettbbiinnpprreeffnnpp() function calls appeared in Mac OS X. Mac OS X August 22, 2007 Mac OS X




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