Disable timerfd/signalfd on openvz, it seems broken
(imported from libratbox r27395 by nenolod)
This commit is contained in:
parent
1e23af243b
commit
21acd0961c
1 changed files with 8 additions and 0 deletions
|
@ -254,6 +254,7 @@ rb_epoll_supports_event(void)
|
||||||
/* try to detect at runtime if everything we need actually works */
|
/* try to detect at runtime if everything we need actually works */
|
||||||
timer_t timer;
|
timer_t timer;
|
||||||
struct sigevent ev;
|
struct sigevent ev;
|
||||||
|
struct stat st;
|
||||||
int fd;
|
int fd;
|
||||||
sigset_t set;
|
sigset_t set;
|
||||||
|
|
||||||
|
@ -262,6 +263,13 @@ rb_epoll_supports_event(void)
|
||||||
if(can_do_event == -1)
|
if(can_do_event == -1)
|
||||||
return 0;
|
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
|
#ifdef USE_TIMERFD_CREATE
|
||||||
if((fd = timerfd_create(CLOCK_REALTIME, 0)) >= 0)
|
if((fd = timerfd_create(CLOCK_REALTIME, 0)) >= 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue