From 39baeaa47a957eefe6eb00296ff8b753e3bf4868 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 15 Oct 2002 18:36:18 +0000 Subject: [PATCH] Configure the pty so that it agrees with our idea of whether Backspace sends ^H or ^?. git-svn-id: svn://svn.tartarus.org/sgt/putty@2076 cda61777-01e9-0310-a592-d414129be87e --- unix/pty.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/unix/pty.c b/unix/pty.c index 0d7b7fe3..2a7abb68 100644 --- a/unix/pty.c +++ b/unix/pty.c @@ -236,6 +236,17 @@ static char *pty_init(char *host, int port, char **realhost, int nodelay) #endif /* + * Set the backspace character to be whichever of ^H and ^? is + * specified by bksp_is_delete. + */ + { + struct termios attrs; + tcgetattr(pty_master_fd, &attrs); + attrs.c_cc[VERASE] = cfg.bksp_is_delete ? '\177' : '\010'; + tcsetattr(pty_master_fd, TCSANOW, &attrs); + } + + /* * Trap as many fatal signals as we can in the hope of having * the best chance to clean up utmp before termination. */ -- 2.11.0