summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-11-23 04:57:42 -0500
committerLennart Poettering <lennart@poettering.net>2013-12-11 01:01:40 +0000
commiteaf73b061604c028aa28f960870a9b46aab2f76a (patch)
tree6c20f116851d40eb37511bfbb80c28c61c87bf65 /src/shared
parent559a4d4cda0155708e5f0797afeb8e80a4e26e43 (diff)
ptyfwd: Set the size of the PTY base on the size of stdout, not stdin.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/ptyfwd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/ptyfwd.c b/src/shared/ptyfwd.c
index 7225b933ff..85a0ddc2ec 100644
--- a/src/shared/ptyfwd.c
+++ b/src/shared/ptyfwd.c
@@ -305,7 +305,7 @@ static int process_pty_loop(int master, sigset_t *mask, pid_t kill_pid, int sign
struct winsize ws;
/* The window size changed, let's forward that. */
- if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) >= 0)
+ if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) >= 0)
ioctl(master, TIOCSWINSZ, &ws);
} else if (sfsi.ssi_signo == SIGTERM && kill_pid > 0 && signo > 0 && !tried_orderly_shutdown) {
@@ -346,7 +346,7 @@ int process_pty(int master, sigset_t *mask, pid_t kill_pid, int signo) {
struct winsize ws;
int r;
- if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) >= 0)
+ if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) >= 0)
ioctl(master, TIOCSWINSZ, &ws);
if (tcgetattr(STDIN_FILENO, &saved_attr) >= 0) {