"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "client.c" between
tmux-3.1.tar.gz and tmux-3.1a.tar.gz

About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.

client.c  (tmux-3.1):client.c  (tmux-3.1a)
skipping to change at line 526 skipping to change at line 526
} }
cf->fd = -1; cf->fd = -1;
if (msg->fd == -1) if (msg->fd == -1)
cf->fd = open(path, msg->flags|flags, 0644); cf->fd = open(path, msg->flags|flags, 0644);
else { else {
if (msg->fd != STDOUT_FILENO && msg->fd != STDERR_FILENO) if (msg->fd != STDOUT_FILENO && msg->fd != STDERR_FILENO)
errno = EBADF; errno = EBADF;
else { else {
cf->fd = dup(msg->fd); cf->fd = dup(msg->fd);
if (client_flags & CLIENT_CONTROL) if (~client_flags & CLIENT_CONTROL)
close(msg->fd); /* can only be used once */ close(msg->fd); /* can only be used once */
} }
} }
if (cf->fd == -1) { if (cf->fd == -1) {
error = errno; error = errno;
goto reply; goto reply;
} }
cf->event = bufferevent_new(cf->fd, NULL, client_write_callback, cf->event = bufferevent_new(cf->fd, NULL, client_write_callback,
client_write_error_callback, cf); client_write_error_callback, cf);
skipping to change at line 681 skipping to change at line 681
} }
cf->fd = -1; cf->fd = -1;
if (msg->fd == -1) if (msg->fd == -1)
cf->fd = open(path, flags); cf->fd = open(path, flags);
else { else {
if (msg->fd != STDIN_FILENO) if (msg->fd != STDIN_FILENO)
errno = EBADF; errno = EBADF;
else { else {
cf->fd = dup(msg->fd); cf->fd = dup(msg->fd);
close(msg->fd); /* can only be used once */ if (~client_flags & CLIENT_CONTROL)
close(msg->fd); /* can only be used once */
} }
} }
if (cf->fd == -1) { if (cf->fd == -1) {
error = errno; error = errno;
goto reply; goto reply;
} }
cf->event = bufferevent_new(cf->fd, client_read_callback, NULL, cf->event = bufferevent_new(cf->fd, client_read_callback, NULL,
client_read_error_callback, cf); client_read_error_callback, cf);
bufferevent_enable(cf->event, EV_READ); bufferevent_enable(cf->event, EV_READ);
 End of changes. 2 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)