mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +00:00
LibCore: Add a wrapper for endgrent()
This commit is contained in:
parent
348750a9f4
commit
d288c700c7
2 changed files with 12 additions and 0 deletions
|
@ -687,6 +687,17 @@ ErrorOr<off_t> lseek(int fd, off_t offset, int whence)
|
|||
return rc;
|
||||
}
|
||||
|
||||
ErrorOr<void> endgrent()
|
||||
{
|
||||
int old_errno = 0;
|
||||
swap(old_errno, errno);
|
||||
::endgrent();
|
||||
if (errno != 0)
|
||||
return Error::from_syscall("endgrent", -errno);
|
||||
errno = old_errno;
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<WaitPidResult> waitpid(pid_t waitee, int options)
|
||||
{
|
||||
int wstatus;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue