From b43857e5b56a439cc017bfeb9b8ba56cf0ea2973 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 28 Mar 2022 07:40:57 +0000 Subject: [PATCH] Report error if creating socket fails with -D. --- usr.bin/tmux/server.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.bin/tmux/server.c b/usr.bin/tmux/server.c index 12e43481f6c..a1293c749c4 100644 --- a/usr.bin/tmux/server.c +++ b/usr.bin/tmux/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.199 2022/03/25 06:14:42 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.200 2022/03/28 07:40:57 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -230,8 +230,10 @@ server_start(struct tmuxproc *client, int flags, struct event_base *base, if (c != NULL) { c->exit_message = cause; c->flags |= CLIENT_EXIT; - } else - free(cause); + } else { + fprintf(stderr, "%s\n", cause); + exit(1); + } } evtimer_set(&server_ev_tidy, server_tidy_event, NULL); -- 2.20.1