aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_powersave.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-08-25 14:47:05 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-08-25 14:47:10 -0400
commite707576e81c62610a312452e8c19c733e2284def (patch)
tree0f2358733c685e6553c87e2a632381bc90bc35c6 /src/bin/e_powersave.c
parentinitialize stack variables (diff)
downloadenlightenment-e707576e81c62610a312452e8c19c733e2284def.tar.gz
check returns for read/write to powersave fds
CID 1379942
Diffstat (limited to 'src/bin/e_powersave.c')
-rw-r--r--src/bin/e_powersave.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/e_powersave.c b/src/bin/e_powersave.c
index 51a53329f..9d4349eeb 100644
--- a/src/bin/e_powersave.c
+++ b/src/bin/e_powersave.c
@@ -186,7 +186,8 @@ e_powersave_sleeper_sleep(E_Powersave_Sleeper *sleeper, int poll_interval)
ret = select(sleeper->fd + 1, &rfds, &wfds, &exfds, &tv);
if ((ret == 1) && (FD_ISSET(sleeper->fd, &rfds)))
{
- read(sleeper->fd, buf, 1);
+ if (read(sleeper->fd, buf, 1) < 0)
+ fprintf(stderr, "%s: ERROR READING FROM FD\n", __func__);
return;
}
else if (ret == 0)
@@ -207,7 +208,8 @@ _e_powersave_sleepers_wake(void)
EINA_LIST_FOREACH(powersave_sleepers, l, sleeper)
{
- write(ecore_pipe_write_fd(sleeper->pipe), buf, 1);
+ if (write(ecore_pipe_write_fd(sleeper->pipe), buf, 1) < 0)
+ fprintf(stderr, "%s: ERROR WRITING TO FD\n", __func__);
ecore_pipe_write(sleeper->pipe, buf, 1);
}
}