summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-11-04 23:12:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-11-04 23:12:44 +0000
commit948d8365576ad37dbb34cd3630c5d60eeb7e270f (patch)
tree70009e10a9025cb6b5b43614621cc5503a677d33 /usr.bin/tmux/server.c
parent52dd67fa64f919338f816fe41b47e9afb8e14657 (diff)
Don't reenlist the client imsg event every loop, instead have a small function
to it and call it after the event triggers or after a imsg is added.
Diffstat (limited to 'usr.bin/tmux/server.c')
-rw-r--r--usr.bin/tmux/server.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c
index 4dd19e66968..e8c0b7dd0fa 100644
--- a/usr.bin/tmux/server.c
+++ b/usr.bin/tmux/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.70 2009/11/04 22:47:34 nicm Exp $ */
+/* $OpenBSD: server.c,v 1.71 2009/11/04 23:12:43 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -160,11 +160,11 @@ server_start(char *path)
log_debug("socket path %s", socket_path);
setproctitle("server (%s)", rpathbuf);
+ event_init();
+
server_fd = server_create_socket();
server_client_create(pair[1]);
- event_init();
-
if (access(SYSTEM_CFG, R_OK) == 0) {
if (load_cfg(SYSTEM_CFG, NULL, &cause) != 0)
goto error;
@@ -215,8 +215,6 @@ server_loop(void)
while (!server_should_shutdown()) {
server_update_socket();
- server_client_prepare();
-
event_loopexit(&tv);
event_loop(EVLOOP_ONCE);