From d55fc77cfa212a0af49d5c33e76b796dcaa62646 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 7 Feb 2018 11:55:40 -0500 Subject: [PATCH] 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 --- src/lib/eio/eio_monitor.c | 14 ++------------ 1 file 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 @@ */ static Eina_Hash *_eio_monitors = NULL; -static pid_t _monitor_pid = -1; static void _eio_monitor_free(Eio_Monitor *monitor) @@ -158,8 +157,6 @@ eio_monitor_init(void) _eio_monitors = eina_hash_stringshared_new(NULL); /* FIXME: this check is optional, but if it is kept then failure should be handled more gracefully */ if (!_eio_monitors) abort(); - - _monitor_pid = getpid(); } void @@ -192,11 +189,10 @@ eio_monitor_shutdown(void) } eina_iterator_free(it); eina_hash_free(_eio_monitors); + _eio_monitors = NULL; eio_monitor_backend_shutdown(); eio_monitor_fallback_shutdown(); - - _monitor_pid = -1; } static const char * @@ -338,13 +334,7 @@ eio_monitor_stringshared_add(const char *path) struct stat st; EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL); - if (_monitor_pid == -1) return NULL; - - if (_monitor_pid != getpid()) - { - eio_monitor_shutdown(); - eio_monitor_init(); - } + EINA_SAFETY_ON_NULL_RETURN_VAL(_eio_monitors, NULL); if (stat(path, &st) != 0) {