mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibCore: Log errors from pipe2 when creating an event loop
This commit is contained in:
parent
0d6115e8ae
commit
4451b4fda0
Notes:
github-actions[bot]
2024-07-23 07:40:37 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/4451b4fda0d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/764
1 changed files with 7 additions and 1 deletions
|
@ -272,7 +272,13 @@ struct ThreadData {
|
|||
if (wake_pipe_fds[1] != -1)
|
||||
close(wake_pipe_fds[1]);
|
||||
|
||||
wake_pipe_fds = MUST(Core::System::pipe2(O_CLOEXEC));
|
||||
auto result = Core::System::pipe2(O_CLOEXEC);
|
||||
if (result.is_error()) {
|
||||
warnln("\033[31;1mFailed to create event loop pipe:\033[0m {}", result.error());
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
wake_pipe_fds = result.release_value();
|
||||
|
||||
// The wake pipe informs us of POSIX signals as well as manual calls to wake()
|
||||
VERIFY(poll_fds.size() == 0);
|
||||
|
|
Loading…
Reference in a new issue