Luna/libs/libc/include/sys/wait.h
apio 671f2a2de3 Kernel, libc: Implement waitpid()
FIXME: exec() is now doing weird page table stuff. But at least it works, no panics :)
2022-10-18 21:30:52 +02:00

27 lines
542 B
C

#ifndef _SYS_WAIT_H
#define _SYS_WAIT_H
#include <sys/types.h>
/* Has the child process exited by calling exit() or _exit()? */
#define WIFEXITED(status) ((status) || 1)
/* What was the child's exit status? */
#define WEXITSTATUS(status) (char)((status)&0xff)
#ifdef __cplusplus
extern "C"
{
#endif
/* Waits for the child process to finish running. */
pid_t waitpid(pid_t pid, int* wstatus, int options);
/* Waits for any child process to finish running. */
pid_t wait(int* wstatus);
#ifdef __cplusplus
}
#endif
#endif