jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fce444bb188d1873d9fb4482811058418588cd6b
commit fce444bb188d1873d9fb4482811058418588cd6b Author: Jean-Philippe Andre <[email protected]> Date: Mon Dec 18 12:25:59 2017 +0900 ecore_con: Make sure the proxy helper is valid If the http proxy helper gets deleted at shutdown rather than because the process actually exited, the object pointer becomes invalid. This patch tries to avoid a situation where the object is not valid. --- src/lib/ecore_con/ecore_con_proxy_helper.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib/ecore_con/ecore_con_proxy_helper.c b/src/lib/ecore_con/ecore_con_proxy_helper.c index c313b4d4f7..f99c7a225b 100644 --- a/src/lib/ecore_con/ecore_con_proxy_helper.c +++ b/src/lib/ecore_con/ecore_con_proxy_helper.c @@ -53,6 +53,16 @@ static int locks = 0; #endif static void +_efl_net_proxy_helper_delete_cb(void *data EINA_UNUSED, const Efl_Event *ev) +{ + if (ev->object == _efl_net_proxy_helper_exe) + { + INF("HTTP proxy helper object died before the process exited."); + _efl_net_proxy_helper_exe = NULL; + } +} + +static void _efl_net_proxy_helper_spawn(void) { char buf[PATH_MAX]; @@ -102,6 +112,8 @@ _efl_net_proxy_helper_spawn(void) locks--; } eina_spinlock_release(&_efl_net_proxy_helper_queue_lock); + efl_event_callback_add(_efl_net_proxy_helper_exe, EFL_EVENT_DEL, + _efl_net_proxy_helper_delete_cb, NULL); } static void --
