1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:57:44 +00:00

Implement waitpid() support for getting the waitee's exit code.

This commit is contained in:
Andreas Kling 2018-10-27 01:24:22 +02:00
parent 5cfeeede7c
commit ec07761d0f
7 changed files with 33 additions and 10 deletions

View file

@ -95,7 +95,7 @@ public:
int sys$geterror() { return m_error; }
void sys$exit(int status);
int sys$spawn(const char* path, const char** args);
pid_t sys$waitpid(pid_t);
pid_t sys$waitpid(pid_t, int* wstatus, int options);
void* sys$mmap(void*, size_t size);
int sys$munmap(void*, size_t size);
int sys$get_dir_entries(int fd, void*, size_t);
@ -160,6 +160,7 @@ private:
void* m_kernelStack { nullptr };
dword m_timesScheduled { 0 };
pid_t m_waitee { -1 };
int m_waiteeStatus { 0 };
int m_fdBlockedOnRead { -1 };
size_t m_maxFileHandles { 16 };