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:28:10 +0830
commitbd8f585d74f472f686ea9f348f3dbded0d056a87 (patch)
tree672986c570b3e62c11335cb1a4e7b86f6b95d29d
parent658a51b3acb6b573e3067c49c73586a337674289 (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 {