mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
Implement waitpid() support for getting the waitee's exit code.
This commit is contained in:
parent
5cfeeede7c
commit
ec07761d0f
7 changed files with 33 additions and 10 deletions
|
@ -10,13 +10,17 @@ pid_t getpid();
|
|||
int open(const char* path);
|
||||
ssize_t read(int fd, void* buf, size_t count);
|
||||
int close(int fd);
|
||||
pid_t waitpid(pid_t);
|
||||
pid_t waitpid(pid_t, int* wstatus, int options);
|
||||
int chdir(const char* path);
|
||||
char* getcwd(char* buffer, size_t size);
|
||||
int lstat(const char* path, stat* statbuf);
|
||||
int sleep(unsigned seconds);
|
||||
int gethostname(char*, size_t);
|
||||
|
||||
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
|
||||
#define WTERMSIG(status) ((status) & 0x7f)
|
||||
#define WIFEXITED(status) (WTERMSIG(status) == 0)
|
||||
|
||||
#define HOST_NAME_MAX 64
|
||||
|
||||
#define S_IFMT 0170000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue