mainLoopExecutor: fix incorrect pipe check
This commit is contained in:
parent
7d8f57083e
commit
1761909bca
1 changed files with 1 additions and 4 deletions
|
|
@ -11,10 +11,7 @@ static int onDataRead(int fd, uint32_t mask, void* data) {
|
||||||
CMainLoopExecutor::CMainLoopExecutor(std::function<void()>&& callback) : m_fn(std::move(callback)) {
|
CMainLoopExecutor::CMainLoopExecutor(std::function<void()>&& callback) : m_fn(std::move(callback)) {
|
||||||
|
|
||||||
int fds[2];
|
int fds[2];
|
||||||
pipe(fds);
|
RASSERT(pipe(fds) == 0, "CMainLoopExecutor: failed to open a pipe");
|
||||||
|
|
||||||
RASSERT(fds[0] != 0, "CMainLoopExecutor: failed to open a pipe");
|
|
||||||
RASSERT(fds[1] != 0, "CMainLoopExecutor: failed to open a pipe");
|
|
||||||
|
|
||||||
m_event = wl_event_loop_add_fd(g_pEventLoopManager->m_wayland.loop, fds[0], WL_EVENT_READABLE, ::onDataRead, this);
|
m_event = wl_event_loop_add_fd(g_pEventLoopManager->m_wayland.loop, fds[0], WL_EVENT_READABLE, ::onDataRead, this);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue