mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Merge branch 'obsd-master'
This commit is contained in:
30
server-fn.c
30
server-fn.c
@ -440,36 +440,6 @@ server_check_unattached(void)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
server_set_stdin_callback(struct client *c, void (*cb)(struct client *, int,
|
||||
void *), void *cb_data, char **cause)
|
||||
{
|
||||
if (c == NULL || c->session != NULL) {
|
||||
*cause = xstrdup("no client with stdin");
|
||||
return (-1);
|
||||
}
|
||||
if (c->flags & CLIENT_TERMINAL) {
|
||||
*cause = xstrdup("stdin is a tty");
|
||||
return (-1);
|
||||
}
|
||||
if (c->stdin_callback != NULL) {
|
||||
*cause = xstrdup("stdin is in use");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
c->stdin_callback_data = cb_data;
|
||||
c->stdin_callback = cb;
|
||||
|
||||
c->references++;
|
||||
|
||||
if (c->stdin_closed)
|
||||
c->stdin_callback(c, 1, c->stdin_callback_data);
|
||||
|
||||
proc_send(c->peer, MSG_STDIN, -1, NULL, 0);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
server_unzoom_window(struct window *w)
|
||||
{
|
||||
|
Reference in New Issue
Block a user