mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Call event_init() before loading the config file, since potentially it could
set up events.
This commit is contained in:
parent
91ad830c88
commit
06ffed3216
4
server.c
4
server.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user