Manual Pages for UNIX Darwin command on man posix_spawn_file_actions_init
MyWebUniversity

Manual Pages for UNIX Darwin command on man posix_spawn_file_actions_init

POSIXSPAWNFILEACTI... BSD Library Functions Manual POSIXSPAWNFILEACTI...

NAME

ppoossiixxssppaawwnnffiilleeaaccttiioonnssiinniitt ppoossiixxssppaawwnnffiilleeaaccttiioonnssddeessttrrooyy - ini-

tialize or destroy spawn file actions objects

SYNOPSIS

##iinncclluuddee <>

int ppoossiixxssppaawwnnffiilleeaaccttiioonnssiinniitt(posixspawnfileactionst *fileactions); int ppoossiixxssppaawwnnffiilleeaaccttiioonnssddeessttrrooyy(posixspawnfileactionst *fileactions);

DESCRIPTION

The ppoossiixxssppaawwnnffiilleeaaccttiioonnssiinniitt() function initializes the object ref-

erenced by fileactions, to an empty set of file actions for subsequent use in a call to posixspawn(2) or posixspawnp(2). A

posixspawnfileactionst object is an opaque type that is used to col-

lect set of file actions specified by calls to posixspawnfileactionsaddclose(3) and posixspawnfileactionsaddopen(3) such that once the spawn operation is complete, the child process will have a different set of file descriptors than the parent, in the order that the operations were added to the posixspawnfileactionst. Additionally, any descriptor in the parent not modified by a file action, and which has the FDCLOEXEC flag set, will be closed in the child.

The ppoossiixxssppaawwnnffiilleeaaccttiioonnssddeessttrrooyy() function destroys the object ref-

erenced by fileactions which was previously intialized by ppoossiixxssppaawwnnffiilleeaaccttiioonnssiinniitt(), returning any resources obtained at the time of initialization to the system for subsequent reuse. A posixspawnfileactionst may be reinitialized after having been destroyed, but must not be reused after destruction, unless it has been reinitialized.

RETURN VALUES

On success, these functions return 0; on failure they return an error number from . EERRRROORRSS These functions will fail and return an error if: [ENOMEM] Insufficient resources to initialize the posixspawnfileactionst object. [EINVAL] The posixspawnfileactionst being destroyed is invalid.

SEE ALSO

posixspawn(2), posixspawnp(2), posixspawnfileactionsaddclose(3), posixspawnfileactionsaddopen(3), posixspawnfileactionsadddup2(3) STANDARDS Version 3 of the Single UNIX Specification (``SUSv3'') [SPN] HISTORY The ppoossiixxssppaawwnnffiilleeaaccttiioonnssiinniitt() and ppoossiixxssppaawwnnffiilleeaaccttiioonnssddeessttrrooyy() 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 ™