jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bd8f585d74f472f686ea9f348f3dbded0d056a87

commit bd8f585d74f472f686ea9f348f3dbded0d056a87
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Thu Aug 27 16:28:10 2015 +0830

    ecore_pipe: add write fdset and except fdset.
    
    ecore_pipe_wait can be run not only select but also 
_ecore_glib_select__locked.
    if write fdset is null, it make problem in FD_ISSET.
    
    @fix
---
 src/lib/ecore/ecore_pipe.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c
index 35f921f..ba6c32b 100644
--- a/src/lib/ecore/ecore_pipe.c
+++ b/src/lib/ecore/ecore_pipe.c
@@ -424,7 +424,7 @@ _ecore_pipe_wait(Ecore_Pipe *p,
                  double      wait)
 {
    struct timeval tv, *t;
-   fd_set rset;
+   fd_set rset, wset, exset;
    double end = 0.0;
    double timeout;
    int ret;
@@ -435,6 +435,8 @@ _ecore_pipe_wait(Ecore_Pipe *p,
      return -1;
 
    FD_ZERO(&rset);
+   FD_ZERO(&wset);
+   FD_ZERO(&exset);
    FD_SET(p->fd_read, &rset);
 
    if (wait >= 0.0)
@@ -472,7 +474,7 @@ _ecore_pipe_wait(Ecore_Pipe *p,
              t = NULL;
           }
 
-        ret = main_loop_select(p->fd_read + 1, &rset, NULL, NULL, t);
+        ret = main_loop_select(p->fd_read + 1, &rset, &wset, &exset, t);
 
         if (ret > 0)
           {

-- 


Reply via email to