From: nicm Date: Fri, 24 Apr 2015 20:58:44 +0000 (+0000) Subject: Set up signal handler earlier so that we don't get zombies, reported by X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a6c40be3f78e08a7a6d82d675ab8674547f15081;p=openbsd Set up signal handler earlier so that we don't get zombies, reported by sobrado@. --- diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index 9dfd20d6874..744a6feb1d5 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.87 2015/04/21 22:21:41 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.88 2015/04/24 20:58:44 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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);