diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-04 22:40:37 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-11-04 22:40:37 +0000 |
commit | 7c41588f63dd0e0c60b445558f675ed033d96e4d (patch) | |
tree | 9915574b683d6b91415d9916090c9554851bbaf8 /usr.bin/tmux | |
parent | 52b190e9c074669b773132a4ee479a282c51bf60 (diff) |
Call event_init() before loading the config file, since potentially it could
set up events.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/server.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 256256d3f8a..033edd7b5e2 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.67 2009/11/04 21:04:43 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.68 2009/11/04 22:40:36 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -163,6 +163,8 @@ server_start(char *path) 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; @@ -173,8 +175,6 @@ server_start(char *path) if (cfg_file != NULL && load_cfg(cfg_file, NULL, &cause) != 0) goto error; - event_init(); - event_set(&server_ev_accept, server_fd, EV_READ|EV_PERSIST, server_accept_callback, NULL); event_add(&server_ev_accept, NULL); |