diff options
author | Daniel Juyung Seo <seojuyung2@gmail.com> | 2013-05-22 20:40:56 +0900 |
---|---|---|
committer | Daniel Juyung Seo <seojuyung2@gmail.com> | 2013-05-22 20:46:19 +0900 |
commit | 3c618e54a16e7c1c5f471f1f4528b57561259f46 (patch) | |
tree | 26f88f0e75d5fadae80d415da4801e6d5c6ed6aa /src/lib/ecore | |
parent | ab079ae1a514c6e9434fb3c5447b55735ef9ec83 (diff) |
ecore_pipe.c: fixed fd handler increasing issue.
Call _ecore_pipe_unhandle() when you return from _ecore_pipe_read() or the fd will never be closed.
This fixed increasing numbers of fd handler issue when you call ecore_pipe_add/del repeatedly.
In that case, reusing ecore_pipe is recommended though.
Diffstat (limited to 'src/lib/ecore')
-rw-r--r-- | src/lib/ecore/ecore_pipe.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c index 6e89fa8917..705673b398 100644 --- a/src/lib/ecore/ecore_pipe.c +++ b/src/lib/ecore/ecore_pipe.c | |||
@@ -656,6 +656,7 @@ _ecore_pipe_read(void *data, | |||
656 | else if ((ret == PIPE_FD_ERROR) && | 656 | else if ((ret == PIPE_FD_ERROR) && |
657 | ((errno == EINTR) || (errno == EAGAIN))) | 657 | ((errno == EINTR) || (errno == EAGAIN))) |
658 | { | 658 | { |
659 | _ecore_pipe_unhandle(p); | ||
659 | return ECORE_CALLBACK_RENEW; | 660 | return ECORE_CALLBACK_RENEW; |
660 | } | 661 | } |
661 | else | 662 | else |
@@ -663,6 +664,7 @@ _ecore_pipe_read(void *data, | |||
663 | ERR("An unhandled error (ret: %i errno: %i [%s])" | 664 | ERR("An unhandled error (ret: %i errno: %i [%s])" |
664 | "occurred while reading from the pipe the length", | 665 | "occurred while reading from the pipe the length", |
665 | (int)ret, errno, strerror(errno)); | 666 | (int)ret, errno, strerror(errno)); |
667 | _ecore_pipe_unhandle(p); | ||
666 | return ECORE_CALLBACK_RENEW; | 668 | return ECORE_CALLBACK_RENEW; |
667 | } | 669 | } |
668 | #else | 670 | #else |