mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-25 08:09:24 +01:00
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.
This commit is contained in:
parent
a97b7ad11c
commit
bf09b00fe9
3
server.c
3
server.c
@ -139,8 +139,11 @@ server_start(char *path)
|
|||||||
fatal("daemon failed");
|
fatal("daemon failed");
|
||||||
|
|
||||||
/* event_init() was called in our parent, need to reinit. */
|
/* 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)
|
if (event_reinit(ev_base) != 0)
|
||||||
fatal("event_reinit failed");
|
fatal("event_reinit failed");
|
||||||
|
unsetenv("EVENT_NOKQUEUE");
|
||||||
clear_signals();
|
clear_signals();
|
||||||
|
|
||||||
logfile("server");
|
logfile("server");
|
||||||
|
3
tmux.c
3
tmux.c
@ -532,7 +532,10 @@ main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (setenv("EVENT_NOKQUEUE", "1", 1) != 0)
|
||||||
|
fatal("setenv");
|
||||||
ev_base = event_init();
|
ev_base = event_init();
|
||||||
|
unsetenv("EVENT_NOKQUEUE");
|
||||||
set_signals(main_signal);
|
set_signals(main_signal);
|
||||||
|
|
||||||
/* Initialise the client socket/start the server. */
|
/* Initialise the client socket/start the server. */
|
||||||
|
Loading…
Reference in New Issue
Block a user