posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
POSIX_MULTI_PROCESS
Implementation completeness: 29.2%29IMPLLine coverage: 85.7%86COV

POSIX Multi-Process option group. More...

Files

file  times.h
 POSIX process CPU time accounting (<sys/times.h>)
 

Functions

int pthread_atfork (void(*prepare)(void), void(*parent)(void), void(*child)(void))
 Register fork handlers to be called around fork().
 
clock_t times (struct tms *buf)
 Get the process and child process times.
 
FUNC_NORETURN void _exit (int status)
 Terminate the calling process without calling atexit() handlers.
 
int execl (const char *path, const char *arg0,...)
 Replace the process image with a new program (argument list form).
 
int execle (const char *path, const char *arg0,...)
 Replace process image with a new program plus environment (argument list form).
 
int execlp (const char *file, const char *arg0,...)
 Replace process image using PATH search (argument list form).
 
int execv (const char *path, char *const argv[])
 Replace process image with a new program (vector form).
 
int execve (const char *path, char *const argv[], char *const envp[])
 Replace process image with a new program plus environment (vector form).
 
int execvp (const char *file, char *const argv[])
 Replace process image using PATH search (vector form).
 
int fexecve (int fd, char *const argv[], char *const envp[])
 Replace process image using an open file descriptor (vector form).
 
pid_t fork (void)
 Create a child process.
 
pid_t getpgid (pid_t pid)
 Get the process group ID of a process.
 
pid_t getpgrp (void)
 Get the process group ID of the calling process.
 
pid_t getpid (void)
 Get the process ID of the calling process.
 
pid_t getppid (void)
 Get the process ID of the parent of the calling process.
 
pid_t getsid (pid_t pid)
 Get the session ID of a process.
 
pid_t setsid (void)
 Create a new session and set the process group ID.
 
unsigned int sleep (unsigned int seconds)
 Suspend execution for at least the specified number of seconds.
 
int usleep (useconds_t useconds)
 Suspend execution for at least the specified number of microseconds (obsolescent).
 

Detailed Description

POSIX Multi-Process option group.

Covers fork(), exec*(), _exit(), getpid(), getppid(), getpgid(), setpgid(), setsid(), getsid(), sleep(), wait*(), and related process-control functions.

Function Documentation

◆ _exit()

FUNC_NORETURN void _exit ( int  status)

Terminate the calling process without calling atexit() handlers.

◆ execl()

int execl ( const char *  path,
const char *  arg0,
  ... 
)

Replace the process image with a new program (argument list form).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/execl.html

◆ execle()

int execle ( const char *  path,
const char *  arg0,
  ... 
)

Replace process image with a new program plus environment (argument list form).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/execle.html

◆ execlp()

int execlp ( const char *  file,
const char *  arg0,
  ... 
)

Replace process image using PATH search (argument list form).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/execlp.html

◆ execv()

int execv ( const char *  path,
char *const  argv[] 
)

Replace process image with a new program (vector form).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/execv.html

◆ execve()

int execve ( const char *  path,
char *const  argv[],
char *const  envp[] 
)

Replace process image with a new program plus environment (vector form).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/execve.html

◆ execvp()

int execvp ( const char *  file,
char *const  argv[] 
)

Replace process image using PATH search (vector form).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/execvp.html

◆ fexecve()

int fexecve ( int  fd,
char *const  argv[],
char *const  envp[] 
)

Replace process image using an open file descriptor (vector form).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fexecve.html

◆ fork()

pid_t fork ( void  )

Create a child process.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html

◆ getpgid()

pid_t getpgid ( pid_t  pid)

Get the process group ID of a process.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpgid.html

◆ getpgrp()

pid_t getpgrp ( void  )

Get the process group ID of the calling process.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpgrp.html

◆ getpid()

pid_t getpid ( void  )
getpid line coverage: 77.8%78

Get the process ID of the calling process.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpid.html

◆ getppid()

pid_t getppid ( void  )

Get the process ID of the parent of the calling process.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getppid.html

◆ getsid()

pid_t getsid ( pid_t  pid)

Get the session ID of a process.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsid.html

◆ pthread_atfork()

int pthread_atfork ( void(*)(void)  prepare,
void(*)(void)  parent,
void(*)(void)  child 
)
pthread_atfork line coverage: 100.0%100

Register fork handlers to be called around fork().

Parameters
prepareHandler called in the parent before fork().
parentHandler called in the parent after fork().
childHandler called in the child after fork().
Returns
0 on success, or a positive error number on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_atfork.html

◆ setsid()

pid_t setsid ( void  )

Create a new session and set the process group ID.

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/setsid.html

◆ sleep()

unsigned int sleep ( unsigned int  seconds)
sleep line coverage: 100.0%100

Suspend execution for at least the specified number of seconds.

◆ times()

clock_t times ( struct tms buf)
times line coverage: 75.0%75

Get the process and child process times.

Parameters
bufOutput: filled with CPU times for the calling process.
Returns
Elapsed real time in clock ticks since an arbitrary epoch, or (clock_t)-1 with errno set on failure.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/times.html

◆ usleep()

int usleep ( useconds_t  useconds)

Suspend execution for at least the specified number of microseconds (obsolescent).

See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/usleep.html