From: nicm Date: Fri, 12 Feb 2021 06:52:48 +0000 (+0000) Subject: Do not care about the server socket closing if exiting anyway. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6e7200d4a6ae00c643da278e8bff45119a0427cc;p=openbsd Do not care about the server socket closing if exiting anyway. --- diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index d9bd79fdef7..0004d97cd6a 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.153 2021/02/11 09:39:29 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.154 2021/02/12 06:52:48 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -553,8 +553,10 @@ static void client_dispatch(struct imsg *imsg, __unused void *arg) { if (imsg == NULL) { - client_exitreason = CLIENT_EXIT_LOST_SERVER; - client_exitval = 1; + if (!client_exitflag) { + client_exitreason = CLIENT_EXIT_LOST_SERVER; + client_exitval = 1; + } proc_exit(client_proc); return; } diff --git a/usr.bin/tmux/file.c b/usr.bin/tmux/file.c index 8c3d7aaface..7a3d86e8816 100644 --- a/usr.bin/tmux/file.c +++ b/usr.bin/tmux/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.9 2021/02/11 09:39:29 nicm Exp $ */ +/* $OpenBSD: file.c,v 1.10 2021/02/12 06:52:48 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott @@ -485,7 +485,7 @@ file_write_left(struct client_files *files) size_t left; int waiting = 0; - RB_FOREACH (cf, client_files, files) { + RB_FOREACH(cf, client_files, files) { if (cf->event == NULL) continue; left = EVBUFFER_LENGTH(cf->event->output);