summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-11 17:25:24 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-11 17:25:24 +0900
commitaf681a10915aadbc2af53522be03ba7c60af046a (patch)
tree3f676b8773cafb85b79ba69601f33adc9069b5e2
parent21c8e7311151931b88568ff11e604907182a8054 (diff)
ecore signal write - save and restore errno since may be on mainloop
now i disabled the signal thread watcher ... save+restore errno.
-rw-r--r--src/lib/ecore/ecore_signal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c
index 4e0b4842ba..e640704212 100644
--- a/src/lib/ecore/ecore_signal.c
+++ b/src/lib/ecore/ecore_signal.c
@@ -11,6 +11,7 @@
11#include <unistd.h> 11#include <unistd.h>
12#include <assert.h> 12#include <assert.h>
13#include <fcntl.h> 13#include <fcntl.h>
14#include <errno.h>
14#include <pthread.h> 15#include <pthread.h>
15 16
16#include "Ecore.h" 17#include "Ecore.h"
@@ -155,7 +156,12 @@ _ecore_signal_callback(int sig, siginfo_t *si, void *foo EINA_UNUSED)
155#endif 156#endif
156 sdata.sig = sig; 157 sdata.sig = sig;
157 sdata.info = *si; 158 sdata.info = *si;
158 if (sdata.sig >= 0) write(sig_pipe[1], &sdata, sizeof(sdata)); 159 if (sdata.sig >= 0)
160 {
161 int err = errno;
162 write(sig_pipe[1], &sdata, sizeof(sdata));
163 errno = err;
164 }
159} 165}
160 166
161static void 167static void