Disable timerfd/signalfd on openvz, it seems broken

(imported from libratbox r27395 by nenolod)
This commit is contained in:
Aaron Sethman 2012-05-18 21:15:16 -05:00 committed by William Pitcock
parent 1e23af243b
commit 21acd0961c

View file

@ -254,6 +254,7 @@ rb_epoll_supports_event(void)
/* try to detect at runtime if everything we need actually works */
timer_t timer;
struct sigevent ev;
struct stat st;
int fd;
sigset_t set;
@ -262,6 +263,13 @@ rb_epoll_supports_event(void)
if(can_do_event == -1)
return 0;
/* Check for openvz..it has a broken timerfd.. */
if(stat("/proc/user_beancounters", &st) == 0)
{
can_do_event = -1;
return 0;
}
#ifdef USE_TIMERFD_CREATE
if((fd = timerfd_create(CLOCK_REALTIME, 0)) >= 0)
{