Example #1
0
void
vifm_try_leave(int write_info, int cquit, int force)
{
	if(!force && bg_has_active_jobs())
	{
		if(!prompt_msg("Warning", "Some of backgrounded commands are still "
					"working.  Quit?"))
		{
			return;
		}
	}

	fuse_unmount_all();

	if(write_info)
	{
		write_info_file();
	}

	if(stats_file_choose_action_set())
	{
		vim_write_empty_file_list();
	}
#ifdef _WIN32
	erase();
	refresh();
#endif
	ui_shutdown();

	vifm_leave(EXIT_SUCCESS, cquit);
}
Example #2
0
void
zfsfuse_listener_exit()
{
    fuse_unmount_all();

    int ret = zfsfuse_listener_stop();
    ASSERT(0 == ret);

	if(file_info_cache != NULL)
		kmem_cache_destroy(file_info_cache);

	close(newfs_fd[0]);
	close(newfs_fd[1]);
}
Example #3
0
static void _gnuc_noreturn
shutdown_nicely(int sig, const char descr[])
{
  LOG_FUNC_ENTER;

	endwin();
	term_title_update(NULL);
	fuse_unmount_all();
	write_info_file();
	fprintf(stdout, "Vifm killed by signal: %d (%s).\n", sig, descr);

	/* Alternatively we could do this sequence:
	 *     signal(sig, SIG_DFL);
	 *     raise(sig);
	 * but only on *nix systems. */
	_Exit(EXIT_FAILURE);
}