mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:27:45 +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;
|
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)
|
ErrorOr<WaitPidResult> waitpid(pid_t waitee, int options)
|
||||||
{
|
{
|
||||||
int wstatus;
|
int wstatus;
|
||||||
|
|
|
@ -100,6 +100,7 @@ ErrorOr<void> clock_settime(clockid_t clock_id, struct timespec* ts);
|
||||||
ErrorOr<pid_t> posix_spawn(StringView path, posix_spawn_file_actions_t const* file_actions, posix_spawnattr_t const* attr, char* const arguments[], char* const envp[]);
|
ErrorOr<pid_t> posix_spawn(StringView path, posix_spawn_file_actions_t const* file_actions, posix_spawnattr_t const* attr, char* const arguments[], char* const envp[]);
|
||||||
ErrorOr<pid_t> posix_spawnp(StringView path, posix_spawn_file_actions_t* const file_actions, posix_spawnattr_t* const attr, char* const arguments[], char* const envp[]);
|
ErrorOr<pid_t> posix_spawnp(StringView path, posix_spawn_file_actions_t* const file_actions, posix_spawnattr_t* const attr, char* const arguments[], char* const envp[]);
|
||||||
ErrorOr<off_t> lseek(int fd, off_t, int whence);
|
ErrorOr<off_t> lseek(int fd, off_t, int whence);
|
||||||
|
ErrorOr<void> endgrent();
|
||||||
|
|
||||||
struct WaitPidResult {
|
struct WaitPidResult {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue