mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 07:33:20 +00:00
LibCore: Add a system wrapper to pipe a file
This uses splice on Linux and mmap+write elsewhere to transfer a file to a pipe. Note we cannot use sendfile because (at least on macOS) the receiving fd must be a socket.
This commit is contained in:
parent
62e52640d0
commit
e433dee543
Notes:
github-actions[bot]
2025-10-14 11:42:14 +00:00
Author: https://github.com/trflynn89
Commit: e433dee543
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6435
3 changed files with 35 additions and 0 deletions
|
@ -403,4 +403,14 @@ ErrorOr<void> kill(pid_t pid, int signal)
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<size_t> transfer_file_through_pipe(int source_fd, int target_fd, size_t source_offset, size_t source_length)
|
||||
{
|
||||
(void)source_fd;
|
||||
(void)target_fd;
|
||||
(void)source_offset;
|
||||
(void)source_length;
|
||||
|
||||
return Error::from_string_literal("FIXME: Implement System::transfer_file_through_pipe on Windows (for HTTP disk cache)");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue