summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-07-24 19:25:33 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-07-24 19:25:33 +0000
commit6a7834b594147699a4d4dc75633d00b45677f1d9 (patch)
treed0f852327da17a2632437b5a54ac89023f1c714b /usr.bin/tmux/server.c
parentc6fbb46493abf59104b81880b06e24172254946c (diff)
kqueue(2) is currently broken when used with /dev/null and a few other
devices. An upcoming fix for some problems with the client stdout/stderr handling relies on it working, so make tmux force libevent to use poll(2) via EVENT_NOKQUEUE, until we have fixed kqueue.
Diffstat (limited to 'usr.bin/tmux/server.c')
-rw-r--r--usr.bin/tmux/server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index 88d73d73a34..4d52b888d5b 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.89 2010/06/21 00:18:57 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.90 2010/07/24 19:25:32 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -139,8 +139,11 @@ server_start(char *path)
fatal("daemon failed");
/* event_init() was called in our parent, need to reinit. */
+ if (setenv("EVENT_NOKQUEUE", "1", 1) != 0)
+ fatal("setenv");
if (event_reinit(ev_base) != 0)
fatal("event_reinit failed");
+ unsetenv("EVENT_NOKQUEUE");
clear_signals();
logfile("server");