since we have a sigbusd handler that flags an eina file with io errors
it has to walk the file cache and every file... taking locks. if those
locks were taking already in the current thread the sighandler was
called in... we'd deadlock. since this basicallly never happens (when
do we see i/o errors really? not much)... we never saw this as it'd
also reauire this race condition to happen too. but it is a problem
waiting to happen. this fixes that by moving to recrusive locks.
@fix
else
sprintf((char *)file->filename, tmpname, ti);
- eina_lock_new(&file->lock);
+ eina_lock_recursive_new(&file->lock);
file->mtime = ti / 1000;
file->length = length;
#ifdef _STAT_VER_LINUX
return EINA_FALSE;
}
- eina_lock_new(&_eina_file_lock_cache);
+ eina_lock_recursive_new(&_eina_file_lock_cache);
eina_magic_string_set(EINA_FILE_MAGIC, "Eina_File");
return EINA_TRUE;