1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibCore: Implement Core::System::lseek

This commit is contained in:
sin-ack 2022-01-18 14:42:45 +00:00 committed by Andreas Kling
parent 4d2e3de94c
commit 301f4c469f
2 changed files with 9 additions and 0 deletions

View file

@ -540,6 +540,14 @@ ErrorOr<pid_t> posix_spawnp(StringView const path, posix_spawn_file_actions_t* c
return child_pid;
}
ErrorOr<off_t> lseek(int fd, off_t offset, int whence)
{
off_t rc = ::lseek(fd, offset, whence);
if (rc < 0)
return Error::from_syscall("lseek", -errno);
return rc;
}
ErrorOr<WaitPidResult> waitpid(pid_t waitee, int options)
{
int wstatus;