while( !quitting )
{
int ret;
struct timespec timeout = {1, 0};
struct kevent ke;
if ( kevent(global_kqueue_handle, NULL, 0, &ke, 1, NULL) == -1 )
if ((ret = kevent(global_kqueue_handle, NULL, 0, &ke, 1, &timeout)) <= 0 )
DPRINTF(E_WARN, L_INOTIFY, "kevent polling failure: %s\n", strerror(errno));
if (ret == -1)
if( next_pl_fill && (time(NULL) >= next_pl_fill) )
fill_playlists();
next_pl_fill = 0;
}
continue;