mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Report better error from server when socket create fails, GitHub issue
1201.
This commit is contained in:
@ -161,7 +161,7 @@ server_client_is_default_key_table(struct client *c, struct key_table *table)
|
||||
}
|
||||
|
||||
/* Create a new client. */
|
||||
void
|
||||
struct client *
|
||||
server_client_create(int fd)
|
||||
{
|
||||
struct client *c;
|
||||
@ -214,6 +214,7 @@ server_client_create(int fd)
|
||||
|
||||
TAILQ_INSERT_TAIL(&clients, c, entry);
|
||||
log_debug("new client %p", c);
|
||||
return (c);
|
||||
}
|
||||
|
||||
/* Open client terminal if needed. */
|
||||
@ -1550,6 +1551,9 @@ server_client_dispatch_command(struct client *c, struct imsg *imsg)
|
||||
int argc;
|
||||
char **argv, *cause;
|
||||
|
||||
if (c->flags & CLIENT_EXIT)
|
||||
return;
|
||||
|
||||
if (imsg->hdr.len - IMSG_HEADER_SIZE < sizeof data)
|
||||
fatalx("bad MSG_COMMAND size");
|
||||
memcpy(&data, imsg->data, sizeof data);
|
||||
|
Reference in New Issue
Block a user