diff --git a/client.c b/client.c index d3ff05a6..e2ffa546 100644 --- a/client.c +++ b/client.c @@ -262,6 +262,9 @@ client_main(int argc, char **argv, int flags) setproctitle("client (%s)", socket_path); logfile("client"); + /* Establish signal handlers. */ + set_signals(client_signal); + /* Initialize the client socket and start the server. */ fd = client_connect(socket_path, cmdflags & CMD_STARTSERVER); if (fd == -1) { @@ -301,9 +304,6 @@ client_main(int argc, char **argv, int flags) tcsetattr(STDIN_FILENO, TCSANOW, &tio); } - /* Establish signal handlers. */ - set_signals(client_signal); - /* Send identify messages. */ client_send_identify(flags);