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

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



   posix_spawn.3p    ( 3 )

порождать процесс (РАСШИРЕННОЕ РЕАЛЬНОЕ ВРЕМЯ) (spawn a process (ADVANCED REALTIME))

Ошибки (Error)

These functions may fail if:

EINVAL The value specified by file_actions or attrp is invalid.

If this error occurs after the calling process successfully returns from the posix_spawn() or posix_spawnp() function, the child process may exit with exit status 127.

If posix_spawn() or posix_spawnp() fail for any of the reasons that would cause fork() or one of the exec family of functions to fail, an error value shall be returned as described by fork() and exec, respectively (or, if the error occurs after the calling process successfully returns, the child process shall exit with exit status 127).

If POSIX_SPAWN_SETPGROUP is set in the spawn-flags attribute of the object referenced by attrp, and posix_spawn() or posix_spawnp() fails while changing the child's process group, an error value shall be returned as described by setpgid() (or, if the error occurs after the calling process successfully returns, the child process shall exit with exit status 127).

If POSIX_SPAWN_SETSCHEDPARAM is set and POSIX_SPAWN_SETSCHEDULER is not set in the spawn-flags attribute of the object referenced by attrp, then if posix_spawn() or posix_spawnp() fails for any of the reasons that would cause sched_setparam() to fail, an error value shall be returned as described by sched_setparam() (or, if the error occurs after the calling process successfully returns, the child process shall exit with exit status 127).

If POSIX_SPAWN_SETSCHEDULER is set in the spawn-flags attribute of the object referenced by attrp, and if posix_spawn() or posix_spawnp() fails for any of the reasons that would cause sched_setscheduler() to fail, an error value shall be returned as described by sched_setscheduler() (or, if the error occurs after the calling process successfully returns, the child process shall exit with exit status 127).

If the file_actions argument is not NULL, and specifies any close, dup2, or open actions to be performed, and if posix_spawn() or posix_spawnp() fails for any of the reasons that would cause close(), dup2(), or open() to fail, an error value shall be returned as described by close(), dup2(), and open(), respectively (or, if the error occurs after the calling process successfully returns, the child process shall exit with exit status 127). An open file action may, by itself, result in any of the errors described by close() or dup2(), in addition to those described by open().

The following sections are informative.