diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-07-24 19:25:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-07-24 19:25:31 +0000 |
commit | bf09b00fe946a06c2f1192bd213f26e5a47889a8 (patch) | |
tree | 8b50a665463f0770aba1c0295e9829d1e2f3d13b | |
parent | a97b7ad11cc6415a120c08bb6598ec9e0ccc5194 (diff) | |
download | rtmux-bf09b00fe946a06c2f1192bd213f26e5a47889a8.tar.gz rtmux-bf09b00fe946a06c2f1192bd213f26e5a47889a8.tar.bz2 rtmux-bf09b00fe946a06c2f1192bd213f26e5a47889a8.zip |
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.
-rw-r--r-- | server.c | 3 | ||||
-rw-r--r-- | tmux.c | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -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"); @@ -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. */ |