summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/server.c5
-rw-r--r--usr.bin/tmux/tmux.c5
2 files changed, 8 insertions, 2 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");
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 644412deaf9..d34b03186de 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.84 2010/07/11 17:06:45 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.85 2010/07/24 19:25:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -532,7 +532,10 @@ main(int argc, char **argv)
exit(1);
}
+ if (setenv("EVENT_NOKQUEUE", "1", 1) != 0)
+ fatal("setenv");
ev_base = event_init();
+ unsetenv("EVENT_NOKQUEUE");
set_signals(main_signal);
/* Initialise the client socket/start the server. */