summaryrefslogtreecommitdiffstats
path: root/osdep-linux.c
authorRaghavendra D Prabhu <[email protected]>2011-01-23 11:59:16 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-01-23 11:59:16 (GMT)
commit0426ab2b383afd38af7274759c3a8d017bc88f00 (patch) (side-by-side diff)
tree2cc4bf1da4062c9ef91f2e94a9625f2423f57102 /osdep-linux.c
parent4e4aed43dc2b40b36f1b31cd3af9f874b78fa454 (diff)
parentb67bfd382d3401de572bb3487b1af3382a9cbeda (diff)
downloadtmux-old-master.zip
tmux-old-master.tar.gz
tmux-old-master.tar.bz2
merged new changesmaster
Diffstat (limited to 'osdep-linux.c') (more/less context) (ignore whitespace changes)
-rw-r--r--osdep-linux.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/osdep-linux.c b/osdep-linux.c
index b7235a5..63f311b 100644
--- a/osdep-linux.c
+++ b/osdep-linux.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: osdep-linux.c,v 1.8 2011/01/13 19:58:47 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <[email protected]>
@@ -19,7 +19,9 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <event.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include "tmux.h"
@@ -57,3 +59,18 @@ osdep_get_name(int fd, unused char *tty)
fclose(f);
return (buf);
}
+
+struct event_base *
+osdep_event_init(void)
+{
+ /*
+ * On Linux, epoll doesn't work on /dev/null (yes, really).
+ *
+ * This has been commented because libevent versions up until the very
+ * latest (1.4 git or 2.0.10) do not handle signals properly when using
+ * poll or select, causing hangs.
+ *
+ */
+ /* setenv("EVENT_NOEPOLL", "1", 1); */
+ return (event_init());
+}