Currently, zathura crashes while performing ':close' command with the
following error:
GThread-ERROR **: file gthread-posix.c: line 226
(g_cond_free_posix_impl): error 'Device or resource busy' during
'pthread_cond_destroy ((pthread_cond_t *) cond)'
The error is because 'render' thread holds condition variable while
waiting for new pages to render. This patch modifies zathura's code to
correctly kill render thread and free allocated resources when the
document is being closed.
NOTE: should be applied on top of "Allow changing of "pages-per-row"
variable at runtime" commit to avoid conflicts in the
'page_view_set_mode()' function.
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
* We don't fail if we can't load a plugin. There can be anything.
* Reintroduce the command line parser from glib.
* Use fstatat as it is more reliable than d_type from dirent.