HomePhabricator

eio/fallback: avoid emitting monitor events if the backend is pending deletion

Authored by zmike on Jun 27 2018, 5:48 AM.

Description

eio/fallback: avoid emitting monitor events if the backend is pending deletion

emitting events if the delete_me flag is set may result in events being emitted
for an already-freed monitor, resulting in both invalid memory access and a
deadlock later on if eio_shutdown has been called at this point

this causes the monitoring thread to check the status of the backend during the
block where the main loop and thread are in sync, avoiding any data races which
could occur when checking the flag at another time, and also avoiding accessing
the internals of the Ecore_Thread which could also have been deallocated during
shutdown

fix T7086

Differential Revision: https://phab.enlightenment.org/D6449