mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
md: Use pledge()
This commit is contained in:
parent
a77da7f245
commit
e45a4b0931
Notes:
sideshowbarker
2024-07-19 10:06:19 +09:00
Author: https://github.com/bgianfo
Commit: e45a4b0931
Pull-request: https://github.com/SerenityOS/serenity/pull/1065
1 changed files with 10 additions and 0 deletions
|
@ -5,6 +5,11 @@
|
|||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (pledge("stdio rpath", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char* file_name = nullptr;
|
||||
bool html = false;
|
||||
|
||||
|
@ -27,6 +32,11 @@ int main(int argc, char* argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (pledge("stdio", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto buffer = file->read_all();
|
||||
dbg() << "Read size " << buffer.size();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue