Name
NAME
posix_spawn, posix_spawnp — spawn a process (ADVANCED REALTIME)
SYNOPSIS
SPN #include <spawn.h> int posix_spawn(pid_t *restrictpid
, const char *restrictpath
, const posix_spawn_file_actions_t *file_actions
, const posix_spawnattr_t *restrictattrp
, char *constargv
[restrict], char *constenvp
[restrict]); int posix_spawnp(pid_t *restrictpid
, const char *restrictfile
, const posix_spawn_file_actions_t *file_actions
, const posix_spawnattr_t *restrictattrp
, char *constargv
[restrict], char * constenvp
[restrict]);
DESCRIPTION
The posix_spawn() and posix_spawnp() functions shall create a new process (child process) from the specified process image. The new process image shall be constructed from a regular executable file called the new process image file.
When a C program is executed as the result of this call, it shall be entered as a C-language function call as follows:
int main (intargc
, char *argv
[]) ;
where argc is the argument count and argv is an array of character pointers to the arguments themselves. In addition, the following variable:
extern char **environ;
shall be initialized as a pointer to an array of character pointers to the environment strings.
The argument argv is an array of character pointers to null-terminated strings. The last member of this array shall be a null pointer and is not counted in argc. These strings constitute the argument list available to the new process image. The value in argv[0] should point to a filename that is associated with the process ...
Get Professional Multicore Programming: Design and Implementation for C++ Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.