Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Disable timerfd/signalfd on openvz, it seems broken
Browse files Browse the repository at this point in the history
(imported from libratbox r27395 by nenolod)
(cherry picked from commit 21acd09)
  • Loading branch information
synandro authored and jillest committed Jul 5, 2012
1 parent 006fb53 commit 319c187
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libratbox/src/epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
{
Expand Down

0 comments on commit 319c187

Please sign in to comment.