Force TTY
Darren Tucker
dtucker at zip.com.au
Sat Dec 17 01:16:23 EST 2005
olle ollesson wrote:
> I'm having problems with getting a tty against an extreme switch. I've tried
> with the -t flag that is supposed to force a tty but it's not working.
>
> I checked the code in ssh.c where this option is parsed:
>
> case 't':
> if (tty_flag)
> force_tty_flag = 1;
> tty_flag = 1;
> break;
>
> The tty_flag is initialized to 0 and what I can see this flag is always 0 at
> this stage in the code. Thus it is impossible to set the force_tty_flag to
> 1.
Hint: the case is inside a loop, so that might run more than once.
> Is this done intentionally or is it a bug? Why the if statement?
"ssh -t -t" forces pty allocation.
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list