Manual Pages for UNIX Darwin command on man posix_spawn_file_actions_adddup2
MyWebUniversity

Manual Pages for UNIX Darwin command on man posix_spawn_file_actions_adddup2

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

NAME

ppoossiixxssppaawwnnffiilleeaaccttiioonnssaaddddcclloossee ppoossiixxssppaawwnnffiilleeaaccttiioonnssaaddddooppeenn - add

open or close actions to a posixspawnfileactionst

SYNOPSIS

##iinncclluuddee <>

int ppoossiixxssppaawwnnffiilleeaaccttiioonnssaaddddcclloossee(posixspawnfileactionst *fileactions, int filedes); int ppoossiixxssppaawwnnffiilleeaaccttiioonnssaaddddooppeenn(posixspawnfileactionst *restrict fileactions, int filedes, const char *restrict path, int oflag, modet mode); int ppoossiixxssppaawwnnffiilleeaaccttiioonnssaadddddduupp22(posixspawnfileactionst *fileactions, int filedes, int newfiledes);

DESCRIPTION

The ppoossiixxssppaawwnnffiilleeaaccttiioonnssaaddddcclloossee() function adds a close operation to the list of operations associated with the object referenced by fileactions, for subsequent use in a call to posixspawn(2) or posixspawnp(2). The descriptor referred to by filedes is closed as if cclloossee() had been called on it prior to the new child process starting execution. The ppoossiixxssppaawwnnffiilleeaaccttiioonnssaaddddooppeenn() function adds an open operation to the list of operations associated with the object referenced by fileactions, for subsequent use in a call to posixspawn(2) or posixspawnp(2). The descriptor referred to by filedes is opened using the path, oflag, and mode arguments as if ooppeenn() had been called on it prior to the new child process starting execution. The string path is copied by the ppoossiixxssppaawwnnffiilleeaaccttiioonnssaaddddooppeenn() function during this process, so storage need not be persistent in the caller. The ppoossiixxssppaawwnnffiilleeaaccttiioonnssaadddddduupp22() function adds a dup2 operation to the list of operations associated with the object referenced by fileactions, for subsequent use in a call to posixspawn(2) or posixspawnp(2). The descriptor referred to by newfiledes is created as if dduupp22() had been called on filedes prior to the new child process starting execution.

RETURN VALUES

On success, these functions return 0; on failure they return an error number from . EERRRROORRSS These functions may fail if: [EBADF] The value specified by filedes is negative or would cause the process to exceed the maximum number of open files it is allowed.. [EINVAL] The value of fileactions is invalid. [ENOMEM] Insufficient memory was available eo add to the fileactions.

SEE ALSO

posixspawn(2), posixspawnp(2), posixspawnfileactionsinit(3), posixspawnfileactionsdestroy(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 ™