summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-07 11:55:40 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-07 12:12:22 -0500
commitd55fc77cfa212a0af49d5c33e76b796dcaa62646 (patch)
treeef2084df728c36ca1c6259a94d8df55b6fadaf98
parent6a500331bdfd5529a582af1033d163f9e53e6861 (diff)
eio: remove broken pid-based monitor reset copied from ecore-file
this has no technical basis for existing and should be handled by individual monitor backends @fix
-rw-r--r--src/lib/eio/eio_monitor.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/lib/eio/eio_monitor.c b/src/lib/eio/eio_monitor.c
index 66519ff2ce..84262bb329 100644
--- a/src/lib/eio/eio_monitor.c
+++ b/src/lib/eio/eio_monitor.c
@@ -29,7 +29,6 @@
29 */ 29 */
30 30
31static Eina_Hash *_eio_monitors = NULL; 31static Eina_Hash *_eio_monitors = NULL;
32static pid_t _monitor_pid = -1;
33 32
34static void 33static void
35_eio_monitor_free(Eio_Monitor *monitor) 34_eio_monitor_free(Eio_Monitor *monitor)
@@ -158,8 +157,6 @@ eio_monitor_init(void)
158 _eio_monitors = eina_hash_stringshared_new(NULL); 157 _eio_monitors = eina_hash_stringshared_new(NULL);
159 /* FIXME: this check is optional, but if it is kept then failure should be handled more gracefully */ 158 /* FIXME: this check is optional, but if it is kept then failure should be handled more gracefully */
160 if (!_eio_monitors) abort(); 159 if (!_eio_monitors) abort();
161
162 _monitor_pid = getpid();
163} 160}
164 161
165void 162void
@@ -192,11 +189,10 @@ eio_monitor_shutdown(void)
192 } 189 }
193 eina_iterator_free(it); 190 eina_iterator_free(it);
194 eina_hash_free(_eio_monitors); 191 eina_hash_free(_eio_monitors);
192 _eio_monitors = NULL;
195 193
196 eio_monitor_backend_shutdown(); 194 eio_monitor_backend_shutdown();
197 eio_monitor_fallback_shutdown(); 195 eio_monitor_fallback_shutdown();
198
199 _monitor_pid = -1;
200} 196}
201 197
202static const char * 198static const char *
@@ -338,13 +334,7 @@ eio_monitor_stringshared_add(const char *path)
338 struct stat st; 334 struct stat st;
339 335
340 EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL); 336 EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
341 if (_monitor_pid == -1) return NULL; 337 EINA_SAFETY_ON_NULL_RETURN_VAL(_eio_monitors, NULL);
342
343 if (_monitor_pid != getpid())
344 {
345 eio_monitor_shutdown();
346 eio_monitor_init();
347 }
348 338
349 if (stat(path, &st) != 0) 339 if (stat(path, &st) != 0)
350 { 340 {