X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5cd99866132366b74289e5a08e963723732bae01..04fa04d8067d235ab45b5bc05b65f0679634b541:/src/unix/evtloopunix.cpp diff --git a/src/unix/evtloopunix.cpp b/src/unix/evtloopunix.cpp index 453f1c354a..b219d1b2dc 100644 --- a/src/unix/evtloopunix.cpp +++ b/src/unix/evtloopunix.cpp @@ -88,17 +88,14 @@ bool PipeIOHandler::Create() return false; } - const int fdRead = GetReadFd(); - - int flags = fcntl(fdRead, F_GETFL, 0); - if ( flags == -1 || fcntl(fdRead, F_SETFL, flags | O_NONBLOCK) == -1 ) + if ( !m_pipe.MakeNonBlocking(wxPipe::Read) ) { wxLogSysError(_("Failed to switch wake up pipe to non-blocking mode")); return false; } wxLogTrace(TRACE_EVENTS, wxT("Wake up pipe (%d, %d) created"), - fdRead, m_pipe[wxPipe::Write]); + m_pipe[wxPipe::Read], m_pipe[wxPipe::Write]); return true; }