From 434ac8734af2a15d5661139acc06a9659f4feed9 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 10 May 2021 07:42:35 +0100 Subject: [PATCH] Looks like evports on SunOS are broken also, disable them. GitHub issue 2702. --- osdep-sunos.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/osdep-sunos.c b/osdep-sunos.c index 138e6bad..c3563ca4 100644 --- a/osdep-sunos.c +++ b/osdep-sunos.c @@ -96,5 +96,17 @@ osdep_get_cwd(int fd) struct event_base * osdep_event_init(void) { - return (event_init()); + struct event_base *base; + + /* + * On Illumos, evports don't seem to work properly. It is not clear if + * this a problem in libevent, with the way tmux uses file descriptors, + * or with some types of file descriptor. But using poll instead is + * fine. + */ + setenv("EVENT_NOEVPORT", "1", 1); + + base = event_init(); + unsetenv("EVENT_NOEVPORT"); + return (base); }