mirror of
https://github.com/tmux/tmux.git
synced 2026-08-24 07:31:36 +00:00
Exit failure on socket failure, from Rayan Salhab.
This commit is contained in:
4
server.c
4
server.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: server.c,v 1.214 2026/07/10 13:38:45 nicm Exp $ */
|
||||
/* $OpenBSD: server.c,v 1.215 2026/08/03 10:07:57 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -234,6 +234,7 @@ server_start(struct tmuxproc *client, uint64_t flags, struct event_base *base,
|
||||
if (cause != NULL) {
|
||||
if (c != NULL) {
|
||||
c->exit_message = cause;
|
||||
c->retval = 1;
|
||||
c->flags |= CLIENT_EXIT;
|
||||
} else {
|
||||
fprintf(stderr, "%s\n", cause);
|
||||
@@ -392,6 +393,7 @@ server_accept(int fd, short events, __unused void *data)
|
||||
c = server_client_create(newfd);
|
||||
if (!server_acl_join(c)) {
|
||||
c->exit_message = xstrdup("access not allowed");
|
||||
c->retval = 1;
|
||||
c->flags |= CLIENT_EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user