summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2015-08-27 16:28:10 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2015-08-27 16:33:40 +0830
commited2f077d6f2a46dd009b380510d9693e0604f770 (patch)
treecde8d73a35276ede0bead98f4b3739650d099186
parent4c2224995e452f6f55c49755f4ef418bd0e13081 (diff)
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
-rw-r--r--src/lib/ecore/ecore_pipe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c
index 35f921f3fa..ba6c32bf3f 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,
424 double wait) 424 double wait)
425{ 425{
426 struct timeval tv, *t; 426 struct timeval tv, *t;
427 fd_set rset; 427 fd_set rset, wset, exset;
428 double end = 0.0; 428 double end = 0.0;
429 double timeout; 429 double timeout;
430 int ret; 430 int ret;
@@ -435,6 +435,8 @@ _ecore_pipe_wait(Ecore_Pipe *p,
435 return -1; 435 return -1;
436 436
437 FD_ZERO(&rset); 437 FD_ZERO(&rset);
438 FD_ZERO(&wset);
439 FD_ZERO(&exset);
438 FD_SET(p->fd_read, &rset); 440 FD_SET(p->fd_read, &rset);
439 441
440 if (wait >= 0.0) 442 if (wait >= 0.0)
@@ -472,7 +474,7 @@ _ecore_pipe_wait(Ecore_Pipe *p,
472 t = NULL; 474 t = NULL;
473 } 475 }
474 476
475 ret = main_loop_select(p->fd_read + 1, &rset, NULL, NULL, t); 477 ret = main_loop_select(p->fd_read + 1, &rset, &wset, &exset, t);
476 478
477 if (ret > 0) 479 if (ret > 0)
478 { 480 {