mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-04-08 19:35:37 +02:00
sshd sets the client terminal mode to original after an interactive session ends
This is needed so that sftp running after a ssh session from a Linux client does not see two lines for each line typed. CRLF is set by win32 sshd server but we have to set mode to the previous way in the client when an interactive session has ended.
This commit is contained in:
parent
c051e06f50
commit
9f26b75d5d
@ -880,6 +880,13 @@ collect_children(void)
|
||||
|
||||
process = s->pid;
|
||||
|
||||
// send the other side terminal to be how it was before if it was tty
|
||||
if ( (!s -> is_subsystem) && (s ->ttyfd != -1)) {
|
||||
char *inittermseq = "\033[20l\033[?7h\0" ; // no LFtoCRLF no AUTOWRAPON
|
||||
Channel *c=channel_by_id ( s->chanid );
|
||||
buffer_append(&c->input, inittermseq, strlen(inittermseq));
|
||||
channel_output_poll();
|
||||
}
|
||||
session_close_by_pid(s->pid, status);
|
||||
|
||||
CloseHandle(process);
|
||||
|
Loading…
x
Reference in New Issue
Block a user