aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_powersave.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 17:28:53 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-07-23 17:28:53 +0900
commit358f154b830c76e0435096799dc40d1967994d94 (patch)
treee80f783792933c4d333e520322fcfd1b75232e98 /src/bin/e_powersave.c
parente meson build - fix PACKAGE_DATA_DIR to include project name at end (diff)
downloadenlightenment-358f154b830c76e0435096799dc40d1967994d94.tar.gz
e powerrsave sleep - add fd get
i could have sworn i added this... i swear i remember adding the fd get line... how did it not make it? this is odd. well add it and fix my spining cpu issue after moving to select to fix pipe wait not being threadsafe.
Diffstat (limited to 'src/bin/e_powersave.c')
-rw-r--r--src/bin/e_powersave.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/e_powersave.c b/src/bin/e_powersave.c
index aada9cc6d..51a53329f 100644
--- a/src/bin/e_powersave.c
+++ b/src/bin/e_powersave.c
@@ -141,6 +141,12 @@ e_powersave_sleeper_new(void)
sleeper = E_NEW(E_Powersave_Sleeper, 1);
sleeper->pipe = ecore_pipe_add(_e_powersave_sleeper_cb_dummy, NULL);
+ if (!sleeper->pipe)
+ {
+ eina_freeq_ptr_add(eina_freeq_main_get(), sleeper, free, sizeof(*sleeper));
+ return NULL;
+ }
+ sleeper->fd = ecore_pipe_read_fd(sleeper->pipe);
ecore_pipe_freeze(sleeper->pipe);
powersave_sleepers = eina_list_append(powersave_sleepers, sleeper);
return (E_Powersave_Sleeper *)sleeper;