mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Merge branch 'master' of github.com:tmux/tmux
This commit is contained in:
commit
716550021e
2
client.c
2
client.c
@ -119,7 +119,7 @@ retry:
|
|||||||
fatal("socket failed");
|
fatal("socket failed");
|
||||||
|
|
||||||
log_debug("trying connect");
|
log_debug("trying connect");
|
||||||
if (connect(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1) {
|
if (connect(fd, (struct sockaddr *) &sa, sizeof(sa)) == -1) {
|
||||||
log_debug("connect failed: %s", strerror(errno));
|
log_debug("connect failed: %s", strerror(errno));
|
||||||
if (errno != ECONNREFUSED && errno != ENOENT)
|
if (errno != ECONNREFUSED && errno != ENOENT)
|
||||||
goto failed;
|
goto failed;
|
||||||
|
@ -196,6 +196,7 @@ cmd_capture_pane_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
if (c == NULL ||
|
if (c == NULL ||
|
||||||
(c->session != NULL && !(c->flags & CLIENT_CONTROL))) {
|
(c->session != NULL && !(c->flags & CLIENT_CONTROL))) {
|
||||||
cmdq_error(cmdq, "can't write to stdout");
|
cmdq_error(cmdq, "can't write to stdout");
|
||||||
|
free(buf);
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
evbuffer_add(c->stdout_data, buf, len);
|
evbuffer_add(c->stdout_data, buf, len);
|
||||||
@ -210,11 +211,12 @@ cmd_capture_pane_exec(struct cmd *self, struct cmd_q *cmdq)
|
|||||||
|
|
||||||
if (paste_set(buf, len, bufname, &cause) != 0) {
|
if (paste_set(buf, len, bufname, &cause) != 0) {
|
||||||
cmdq_error(cmdq, "%s", cause);
|
cmdq_error(cmdq, "%s", cause);
|
||||||
free(buf);
|
|
||||||
free(cause);
|
free(cause);
|
||||||
|
free(buf);
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(buf);
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
}
|
}
|
||||||
|
2
server.c
2
server.c
@ -144,7 +144,7 @@ server_create_socket(void)
|
|||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
mask = umask(S_IXUSR|S_IXGRP|S_IRWXO);
|
mask = umask(S_IXUSR|S_IXGRP|S_IRWXO);
|
||||||
if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) == -1)
|
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
umask(mask);
|
umask(mask);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user