From: nicm Date: Mon, 28 Mar 2022 07:40:57 +0000 (+0000) Subject: Report error if creating socket fails with -D. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b43857e5b56a439cc017bfeb9b8ba56cf0ea2973;p=openbsd Report error if creating socket fails with -D. --- 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);