From 3b8bd8e77ad182ce035121f4bf3cba6e6e2422c5 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Mon, 20 Oct 2008 08:44:14 +0000 Subject: [PATCH] Actually fix pty detection for autologout setting. (The fix has been submitted upstream.) --- contrib/tcsh/sh.c | 2 +- contrib/tcsh/tc.const.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/tcsh/sh.c b/contrib/tcsh/sh.c index 89056f5cb53f..1bbb1cb9c157 100644 --- a/contrib/tcsh/sh.c +++ b/contrib/tcsh/sh.c @@ -462,7 +462,7 @@ main(int argc, char **argv) else cp2 = cp; if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) || - Strstr(cp, STRslptssl) != NULL)) { + Strstr(cp, STRptssl) != NULL)) { if (getenv("DISPLAY") == NULL) { /* NOT on X window shells */ setcopy(STRautologout, STRdefautologout, VAR_READWRITE); diff --git a/contrib/tcsh/tc.const.c b/contrib/tcsh/tc.const.c index d63de6fb9e8b..4ed1212fe645 100644 --- a/contrib/tcsh/tc.const.c +++ b/contrib/tcsh/tc.const.c @@ -46,7 +46,7 @@ Char STRautomatic[] = { 'a', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c', Char STRhangup[] = { 'h', 'a', 'n', 'g', 'u', 'p', '\0' }; Char STRaout[] = { 'a', '.', 'o', 'u', 't', '\0' }; Char STRtty[] = { 't', 't', 'y', '\0' }; -Char STRslptssl[] = { '/', 'p', 't', 's', '/', '\0' }; +Char STRptssl[] = { 'p', 't', 's', '/', '\0' }; Char STRany[] = { 'a', 'n', 'y', '\0' }; Char STRstatus[] = { 's', 't', 'a', 't', 'u', 's', '\0' }; Char STR0[] = { '0', '\0' };