summaryrefslogtreecommitdiff
path: root/src/lib/ecore_buffer
diff options
context:
space:
mode:
authorBoram Park <boram1288.park@samsung.com>2015-09-23 09:23:21 -0400
committerChris Michael <cp.michael@samsung.com>2015-09-23 09:23:21 -0400
commit411089d5e3082ce22f0bb2ee133b42bddf1d2b0a (patch)
tree502757d5c2a0a9ac3e56435bad08ff8a35c16de3 /src/lib/ecore_buffer
parent3ebdfd8779d53c032649f52a69f0bc5b77999861 (diff)
ecore_buffer: abort if wl_display_dispatch returns negative value
Summary: If the connection between server and client has problems, wl_display_dispatch an return negative value. i.e. when enlightenment has been killed accidently. In this case, app can enter into infinite loop. Signed-off-by: Boram Park <boram1288.park@samsung.com> Reviewers: stefan_schmidt, zmike, gwanglim, raster, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3078
Diffstat (limited to 'src/lib/ecore_buffer')
-rw-r--r--src/lib/ecore_buffer/ecore_buffer_con.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/ecore_buffer/ecore_buffer_con.c b/src/lib/ecore_buffer/ecore_buffer_con.c
index 7cc4bc5103..09a887a006 100644
--- a/src/lib/ecore_buffer/ecore_buffer_con.c
+++ b/src/lib/ecore_buffer/ecore_buffer_con.c
@@ -248,6 +248,17 @@ _ecore_buffer_con_consumer_create(const char *name, int queue_size, int w, int h
248void 248void
249_ecore_buffer_con_init_wait(void) 249_ecore_buffer_con_init_wait(void)
250{ 250{
251 int ret;
252
251 while (!_connection->init_done) 253 while (!_connection->init_done)
252 wl_display_dispatch(_connection->display); 254 {
255 ret = wl_display_dispatch(_connection->display);
256 if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
257 {
258 /* raise exit signal */
259 ERR("Wayland socket error: %s", strerror(errno));
260 abort();
261 break;
262 }
263 }
253} 264}