mirror of
https://github.com/tmate-io/tmate.git
synced 2024-11-07 16:54:01 +01:00
Because we pass the file descriptor from client to server, tmux can't
usefully work if stdin is /dev/tty. Complain about it more clearly.
This commit is contained in:
parent
a47d2397df
commit
e5d85c6c3c
@ -119,6 +119,11 @@ server_client_open(struct client *c, char **cause)
|
||||
if (c->flags & CLIENT_CONTROL)
|
||||
return (0);
|
||||
|
||||
if (strcmp(c->ttyname, "/dev/tty") == 0) {
|
||||
*cause = xstrdup("can't use /dev/tty");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (!(c->flags & CLIENT_TERMINAL)) {
|
||||
*cause = xstrdup("not a terminal");
|
||||
return (-1);
|
||||
|
Loading…
Reference in New Issue
Block a user