LibC: Implement wait()
This is a simple convenience wrapper over waitpid().
This commit is contained in:
parent
fde8f7f538
commit
bec646c0bb
Notes:
sideshowbarker
2024-07-19 12:39:12 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/bec646c0bbe Pull-request: https://github.com/SerenityOS/serenity/pull/456 Reviewed-by: https://github.com/awesomekling ✅
2 changed files with 6 additions and 0 deletions
|
@ -236,6 +236,11 @@ pid_t waitpid(pid_t waitee, int* wstatus, int options)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
pid_t wait(int* wstatus)
|
||||
{
|
||||
return waitpid(-1, wstatus, 0);
|
||||
}
|
||||
|
||||
int lstat(const char* path, struct stat* statbuf)
|
||||
{
|
||||
int rc = syscall(SC_lstat, path, statbuf);
|
||||
|
|
|
@ -66,6 +66,7 @@ ssize_t read(int fd, void* buf, size_t count);
|
|||
ssize_t write(int fd, const void* buf, size_t count);
|
||||
int close(int fd);
|
||||
pid_t waitpid(pid_t, int* wstatus, int options);
|
||||
pid_t wait(int* wstatus);
|
||||
int chdir(const char* path);
|
||||
char* getcwd(char* buffer, size_t size);
|
||||
char* getwd(char* buffer);
|
||||
|
|
Loading…
Add table
Reference in a new issue