Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   posix_spawn    ( 3 )

порождать процесс (spawn a process)

Примечание (Note)

The housekeeping activities in the child are controlled by the
       objects pointed to by attrp (for non-file actions) and
       file_actions In POSIX parlance, the posix_spawnattr_t and
       posix_spawn_file_actions_t data types are referred to as objects,
       and their elements are not specified by name.  Portable programs
       should initialize these objects using only the POSIX-specified
       functions.  (In other words, although these objects may be
       implemented as structures containing fields, portable programs
       must avoid dependence on such implementation details.)

According to POSIX, it is unspecified whether fork handlers established with pthread_atfork(3) are called when posix_spawn() is invoked. Since glibc 2.24, the fork handlers are not executed in any case. On older implementations, fork handlers are called only if the child is created using fork(2).

There is no "posix_fspawn" function (i.e., a function that is to posix_spawn() as fexecve(3) is to execve(2)). However, this functionality can be obtained by specifying the path argument as one of the files in the caller's /proc/self/fd directory.